Skip to content

Usage error: To create role assignments, specify both --role and --scopes. #21960

@SSPJ

Description

@SSPJ

Describe the bug

Previously working az ad sp create-for-rbac command has stopped working.

Command Name
az ad sp create-for-rbac

Errors:

Usage error: To create role assignments, specify both --role and --scopes.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • az ad sp create-for-rbac --name {} --scopes {} --sdk-auth

Expected Behavior

Service principal is created.

Environment Summary

Linux-5.4.0-1074-azure-x86_64-with-glibc2.28 (Cloud Shell), Common Base Linux Delridge (quinault)
Python 3.8.12
Installer: DEB

azure-cli 2.35.0

Extensions:
ai-examples 0.2.5
ssh 1.0.1

Dependencies:
msal 1.17.0
azure-mgmt-resource 20.0.0

Additional Context

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botGraphaz adcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions