You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Allow New-AzADServicePrincipalAppRoleAssignment to assign an app role to a group or user #30027
New-AzADServicePrincipalAppRoleAssignment only lets you name a service principal as the principal receiving the role. Every parameter set takes -ServicePrincipalId or -ServicePrincipalDisplayName, so there is no way to assign an app role to a group or a user.
In Graph terms, appRoleAssignedTo accepts a principalId that can be a user, a group or a service principal. Az only exposes the service principal case.
Assigning an app role to a security group is the normal way to control who can use an application. It's what most tenants actually do, rather than assigning to individual principals. Right now that step can't be scripted with Az, so an otherwise pure Az deployment has to drop out to the Graph SDK for one call.
Suggestion
Add a -PrincipalId parameter (or equivalent) that accepts a user, group or service principal object id, matching what the underlying Graph API already supports.
Environment
Az.Resources, current version. Same behaviour on Windows PowerShell and PowerShell 7.
Activity
microsoft-github-policy-service commentedon Aug 27, 2026
🔔 Routing this issue to @Azure/act-identity-squad.
microsoft-github-policy-service commentedon Aug 27, 2026
🔔 Routing this issue to @Azure/act-identity-squad.