New-AzureADServiceAppRoleAssignment

This article provides migration details from New-AzureADServiceAppRoleAssignment command to Microsoft Graph PowerShell.

Summary

Permissions

Permission type Permissions (from least to most privileged)
Delegated (work or school account) AppRoleAssignment.ReadWrite.All and Application.Read.All, AppRoleAssignment.ReadWrite.All and Directory.Read.All
Delegated (personal Microsoft account) Not supported.
Application AppRoleAssignment.ReadWrite.All and Application.Read.All, AppRoleAssignment.ReadWrite.All and Directory.Read.All

View more details on permissions.

Note

As a best practice, we recommend creating app role assignments through the appRoleAssignedTo relationship of the resource service principal, instead of the appRoleAssignments relationship of the assigned user, group, or service principal.

Property Mapping

Azure AD Name Microsoft Graph Name
Id Id
ObjectId ServicePrincipalId
PrincipalId PrincipalId
ResourceId ResourceId