how can i add users or a group to a service principal in azure with powershell?
My Service Principal:
$servicePrincipal = Get-AzADServicePrincipal -DisplayName "My Application"
i want to add the user [email protected] or the group "IT" to this service principal.
EDIT: Or the AppRoleAssignmentRequired set to "false" would be fine too.
CodePudding user response:
I found the solution how to disable that role assignment is required. I post the solution before i delete the thread. Maybe this helps someone.
Get-AzureADServicePrincipal -Filter "displayname eq 'My Application'" | set-AzureADServicePrincipal -AppRoleAssignmentRequired $true