az ad app permission add ERROR : Property requiredResourceAccess.resourceAccess is invalid.
See original GitHub issueI have some trouble adding roles via the permission subcommand:
az ad app permission add --id $MyAppId --api $MyApplicationIWantToAccessId --api-permissions "<RoleId>=Role"
if I add my role manually via the manifest on azure, it works, if I do the same thing with this command, I get the following error:
az : ERROR: Property requiredResourceAccess.resourceAccess is invalid.
Au caractère Ligne:1 : 1
+ az ad app permission add --id xxxx --api xxxx --api-permissions "xxxx ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (ERROR: Property...ess is invalid.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
I only found examples using “Scope” instead of “Role” as permission type
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 6a5b5348-f67e-ef14-0529-4c80fddd4bc6
- Version Independent ID: bfd7e6b1-1fba-3d25-8ee3-5105bcf4157d
- Content: az ad app permission
- Content Source: src/command_modules/azure-cli-role/azure/cli/command_modules/role/_help.py
- Service: active-directory
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Property requiredResourceAccess.resourceAccess is invalid ...
resourceAccess is invalid, when specifying "Type" as "Role" while creating graph permission for AAD App. Describe the bug. Please refer this ...
Read more >Trying to Add Application Permission via Azure CLI/Powershell
... following error: "Property requiredResourceAccess.resourceAccess is invalid." This is the command I am running: az ad app permission add ...
Read more >Azure app registration throws ERROR: Request contains a ...
ERROR : Request contains a property with duplicate values. Failed Azure CLI Command: az ad app create --display-name MytestApp --native-app false ...
Read more >Azure AD Sign-in Error 65005 - ManageEngine
The application required resource access list does not contain applications ... you may have configured the application with the wrong Identifier (Entity).
Read more >azuread_application | Resources | hashicorp/azuread
Manages an application registration within Azure Active Directory. API Permissions. The following API permissions are required in order to use this resource.
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 Free
Top 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
@fabienso anyway, let’s stick to
az rest
for now. We will revisit this when we migrate to MS Graph in the future.The problem is simply that it does not recognize the “Type” -> “Role” under the permissions when the resource requirements are passed and throws the error (which is in the debug log). “Role” is not recognized or accepted when adding permissions to the Active Directory applications. Maybe I’m doing something wrong or it’s because of the current az cli version.