如何将用户分配到Azure AD中的本机应用程序

我在Azure AD上创build了用户和本机应用程序注册。 默认情况下,所有者被分配到应用程序。 如何将新创build的用户分配到应用程序注册? 我可以做到这一点没有任何问题的Web应用程序types。

以下屏幕打印显示可用的选项:

丝网印刷

您可以使用PowerShell中的cmdlet将用户分配给本机应用程序。

以下cmdlet将用户分配给没有angular色的应用程序。

$appId = (Get-AzureADApplication -SearchString “<Your App's display name>”).AppId $user = Get-AzureADUser -searchstring "<Your user's UPN>" $servicePrincipal = Get-AzureADServicePrincipal -Filter “appId eq '$appId'” New-AzureADUserAppRoleAssignment -ObjectId $user.ObjectId -PrincipalId $user.ObjectId -ResourceId $servicePrincipal.ObjectId -Id ([Guid]::Empty) 

有关将用户分配给应用程序angular色的命令的更多信息,请参阅以下文章。

https://docs.microsoft.com/en-us/powershell/module/azuread/New-AzureADUserAppRoleAssignment?view=azureadps-2.0