I would like to define the owner during the app registration creation by myself or suppress that an owner is set at all.
The default behavior seems to be, that the command New-AzureADMSApplication
adds the user that established the connection to Azure before as the owner of the created app registration. According to the Azure Active Directory PowerShell 2.0 reference I was not able to find a parameter to set the owner by myself.
- I cannot use the command
New-AzureADApplication
because it has issues with-SignInAudience
- I want to avoid reading out the owner id after the creation, removing it and set the responsible user for the app registration
CodePudding user response:
AFAIK, currently there is no options to add/Remove the owner role while creating the app registration. Using azure portal, we can do while creating the app registration.
You can use the below commands to Add/Remove the Owner role of an application.
#Add AzADMS application owner role
Add-AzureADMSApplicationOwner
-ObjectId <AAD object>
-RefObjectId <AAD object will be assigned to owner/manager/member>
#Remove AzADMS application owner role
Remove-AzureADMSApplicationOwner
-ObjectId <AAD object>
-RefObjectId <AAD object will be assigned to owner/manager/member>