Skip to content

From bash unable to create a role assignment for an Service Principal scoped to management group #24547

@jeevanions

Description

@jeevanions

When the same command from the terminal using the same login account, runs without error. If I use the same command in a bash script, then I get this error message. The Document reference doesn't include an example for role assignment for a management group. Could we add an example here please?

Any clue why this is failing?

Command Run: az role assignment create --assignee-object-id $sp_id --assignee-principal-type "ServicePrincipal" --role "Owner" --scope $mgmt_id
Error Message : The request did not have a subscription or a valid tenant level resource provider.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions