If you are looking for a way to create cloud user for a specific domain you can use the following:
Please note the following:
- Variable set as input in the Custom action
- Domain can't be change by the Operator (restricted by the script)
Sample Script:
$UserPincipalName = $UPN+'@M365x795031.OnMicrosoft.com' $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile $PasswordProfile.Password = $Password New-AzureADUser -DisplayName $DisplayName -PasswordProfile $PasswordProfile -UserPrincipalName $UserPincipalName -AccountEnabled $true -MailNickName $UPN
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article