2

I have created users and a Native-App registration on Azure AD. By default, the owner is assigned to the app. How do I assign newly created users to the app registration? I can do it without any issue for Web-App type.

Following screen-print shows the options available to me:

Screen-print

Pratheek
  • 125
  • 5

1 Answers1

4

You can assign the users to native applications by using cmdlets in PowerShell.

The following cmdlets assign a user to an application without roles.

$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)

More information about the command for assigning a user to an application role, please refer to the following article.

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

Andy Liu - MSFT
  • 351
  • 1
  • 4