-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New-AzAdServicePrincipal does not process all input parameters #16841
Comments
@VeryEarly , please help to look into it. |
Hi @alexv-be , The limited parameters for creating service principal is to align with older version of New-AzADServicePrincipal (using AAD API and not switch to Microsoft Graph API), we plan to enable other optional parameters soon in the near future. Thanks |
Thanks for the follow up! The breaking changes notice is in the documentation, why not add a notice that it's only partially implemented? A "use at your own risk" kind of thing? |
Hi @alexv-be , fix will be available early next month. |
thank you! |
Description
The New-AzAdServicePrincipal documentation lists several parameters, like -AppRoleAssignmentRequired, which should do the following:
Specifies whether users or other service principals need to be granted an app role assignment for this service principal before users can sign in or apps can get tokens.
When trying a command like:
New-AzADServicePrincipal -AppRoleAssignmentRequired
the following error is shown:
New-AzADServicePrincipal: A parameter cannot be found that matches parameter name 'AppRoleAssignmentRequired'.
When looking at the powershell code in Az.MsGraph\New-AzAdServicePrincipal.ps1, the script first creates an AzAdApplication with the current set of $PSBoundParameters. Once the app is created, it tries to create a service principal with a limited set of parameters: AppId & AccountEnabled.
This also ignores the -accountenabled switch that is also documented.
I think this is the the code that actually makes the service principal
It's my first time navigating this code, I hope I didn't overlook or misinterpret anything.
But it seems the implementation is only partially done?
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: