App Registration - App-Roles not updated when array with single app role is provided.
See original GitHub issueDescribe the bug
When updating an app registration trying to add an App Role providing a single app role in a json array file the command succeeds. but no app role is created in the App Reg Manifest. Providing two app roles in the array updates successfully.
Command Name
az ad app update
Errors:
No Errors are produced but passing a single app-role in an array is not created
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Put any pre-requisite steps here…
When running
az ad app update --id <name> --app-roles <json array>
with the below as the json content
[
{
"allowedMemberTypes": [
"Application"
],
"description": "TestRol",
"displayName": "TestRole",
"id": "c94e8335-ab55-4589-ba7d-075b035605c5",
"isEnabled": true,
"origin": "Application",
"value": "TestRole"
}
]
the command executes successfully but the App Role is NOT created\viewable in either the portal or via CLI.
If I add a second app role to the Json file
[
{
"allowedMemberTypes": [
"Application"
],
"description": "TestRol",
"displayName": "TestRole",
"id": "c94e8335-ab55-4589-ba7d-075b035605c5",
"isEnabled": true,
"origin": "Application",
"value": "TestRole"
},
{
"allowedMemberTypes": [
"Application"
],
"description": "TestRol2",
"displayName": "TestRole2",
"id": "c94e8335-ab55-4581-ba7d-075b035605c5",
"isEnabled": true,
"origin": "Application",
"value": "TestRole2"
}
]
The command executes successfully and both app roles are created
Expected Behavior
App Roles in App Registration should be created regardless of Array size (in this case 1 entry in the array)
Environment Summary
macOS-12.5-arm64-arm-64bit, Darwin 21.6.0
Python 3.10.6
Installer: HOMEBREW
azure-cli 2.39.0
Extensions:
account 0.2.3
Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
Additional Context
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Add app roles and get them from a token - Microsoft Entra
Learn how to add app roles to an application registered in Azure Active Directory. Assign users and groups to these roles, and receive...
Read more >appRole defined in AzureAD application not being included ...
This is the case with members of the current tenant as well as newly added guest users of type "Microsoft Account" for the...
Read more >Using App Roles With Azure Active Directory and Blazor ...
Let's explore how we can use App Roles with Azure Active Directory and Blazor WASM Hosted apps to increase application security.
Read more >App Roles to manage authorization in your application ...
This month's community call covered App Roles to manage authorization in your application including what is Authentication and Authorization ...
Read more >AppRole Auth Method (API) - Vault - HashiCorp Developer
Since it is possible to enable auth methods at any location, please update your API calls accordingly. List Roles. This endpoint returns a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
wants to crawl into a hole and die
Yeah dynamic typing in Powershell got me - two entries makes it an array…
Looks like you didn’t surround the app role with square brackets:
Could your surround it with
[]
and try again?