question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az ad app permission add ERROR : Property requiredResourceAccess.resourceAccess is invalid.

See original GitHub issue

I 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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jiaslicommented, Apr 12, 2021

@fabienso anyway, let’s stick to az rest for now. We will revisit this when we migrate to MS Graph in the future.

0reactions
fabiensocommented, Apr 12, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found