AzRoleAssignment for service principal.
Surprisingly the powershell command to add role assignment to service principal can be set using -applicationId.
New-AzRoleAssignment -ApplicationId serviceprincipal
-RoleDefinitionName "Azure Kubernetes Service Cluster User Role"
-Scope
"your-resource-scope"
Comments