0 votes

I'm currently writing an "After User Creation" rule and I have a PowerShell script that adds the newly created, on-premises synced user to a handful of cloud-only Entra ID groups used for group based licensing. The problem I'm having is that the script keeps saying the user isn't found when I run the command using sAMAccountName or SID but it works fine if I go and find the Entra ID specific SID number for the user. The problem is that the Entra specific SID doesn't appear to be an option in the value references for my script.

So, how can I add an on-premises synced user to a cloud only group in an "After User Creation" rule using PowerShell?

image.png image.png

I should note that using the regular actions (outside of PowerShell) work fine in this scenario, it is only the powershell cmdlet that fails. I need to use PowerShell for the additional condtional flexibility.

by (60 points)

1 Answer

0 votes
by (299k points)

Hello,

If the built-in Add to group action works fine, you already have the pre-create function enabled for Microsoft Entra accounts. In this case, the script should also work fine. Make sure to set the -Server parameter to cloud domain, e.g. company.onmicrosoft.com. Should the issue persist, please, send the full script you are using without hiding anything at support@adaxes.com.

0

I think I figured it out, the script is working when I actually run the business rule but does not work when I run the script from the script editor.

Thank you for your help.

Related questions

0 votes
1 answer

Hi all, How can I add a user directly to an Entra ID group? I understand it might be possible via CLI e.g. Add-AzureADGroupMember - But is there a built-in GUI method via Business Rules? Thanks, David

asked Oct 2, 2024 by dshortall (80 points)
0 votes
1 answer

is this available yet, will it be available at all. any news on an update for Adaxes, the last one was over a year ago.

asked Dec 11, 2024 by i*windows (300 points)
0 votes
1 answer

Hello, We are using Adaxes to manage our Cloud Only infrastructure, and one of the problems we have run into is when creating a NEW user, we need to fill out some ... and then write the data meant for the Custom Attributes field when the mailbox is ready?

asked Jan 29 by AvenuesRecovery (70 points)
0 votes
1 answer

The rule runs but since the first name and last name are passed as parameters, I only get the sequential # as a userID without the initials.

asked Oct 24, 2024 by curtisa (330 points)
0 votes
1 answer

I have tried it using the Custom Commands Action "Add the user to a group", which only allows me to add the user to one group at a time, and can't use the multiple DNs that the ... I can't get it to work. Could you assist me in finding the best way to do this?

asked Jan 16, 2024 by dominik.stawny (280 points)
3,633 questions
3,321 answers
8,398 comments
548,760 users