azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

[Reference feedback]: No such parameter to add serviceManagementReference in az ad sp create-for-rbac

Open qjjy29 opened this issue 1 year ago • 6 comments

Type of issue

Other (describe below)

Reference command name

When I run az ad sp create-for-rbac --name myname --create-cert

It shows serviceManagementReference field is required for Create, but is missing in the request. However, there is no way to add serviceManagementReference in this command.

Feedback

Can you add a parameter to add serviceManagementReference?

Page URL

No response

Content source URL

No response

Author

No response

Document Id

No response

qjjy29 avatar Jan 24 '25 23:01 qjjy29

Thank you for opening this issue, we will look into it.

yonzhan avatar Jan 24 '25 23:01 yonzhan

It is by design that --service-management-reference is not added to az ad sp create-for-rbac.

--service-management-reference was added to az ad app create/update in https://github.com/Azure/azure-cli/pull/29860. This feature was released with Azure CLI 2.65.0 on 2024-10-08.

Even though az ad sp create-for-rbac automatically creates an application, this command is only used for creating application + service principal that are used to manage Azure resources through RBAC, not for creating general-purpose application. We don’t want to add --service-management-reference to az ad sp command group which will confuse users.

However, we are still reviewing this proposal internally and will give a final conclusion.

jiasli avatar Jan 26 '25 03:01 jiasli

@yonzhan - Azure Docs are outdated - link.

Can someone work to update this?

Tonychen0227 avatar Apr 24 '25 05:04 Tonychen0227

--service-management-reference has been added to az ad sp create-for-rbac in https://github.com/Azure/azure-cli/pull/31212.

jiasli avatar Apr 24 '25 06:04 jiasli

@Tonychen0227, --service-management-reference is a required argument only in Microsoft. It is not an argument that should be used by external users.

jiasli avatar Apr 24 '25 06:04 jiasli

Awesome, thanks @jiasli !

Tonychen0227 avatar Apr 24 '25 06:04 Tonychen0227