Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding note about change in behaviour for az cli #23413

Closed
wants to merge 1 commit into from

Conversation

FrankBoylan92
Copy link

As per discussion with sureshja@microsoft.com, since the change of az cli from version 2.37, the az ad sp commands no longer operate on the App Registration, they operate on the Enterprise Application/Service Principal:
https://docs.microsoft.com/en-us/cli/azure/microsoft-graph-migration#az-ad-sp-credential

This change in behaviour has prompted a request to change the docs to clarify the behaviour

Related command

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

As per discussion with sureshja@microsoft.com, since the change of az cli from version 2.37, the az ad sp commands no longer operate on the App Registration, they operate on the Enterprise Application/Service Principal:
https://docs.microsoft.com/en-us/cli/azure/microsoft-graph-migration#az-ad-sp-credential

This change in behaviour has prompted a request to change the docs to clarify the behaviour
@ghost ghost added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Aug 2, 2022
@ghost
Copy link

ghost commented Aug 2, 2022

Thank you for your contribution FrankBoylan92! We will review the pull request and get back to you soon.

@ghost ghost requested a review from yonzhan August 2, 2022 11:03
@ghost ghost added the Auto-Assign Auto assign by bot label Aug 2, 2022
@ghost ghost requested a review from wangzelin007 August 2, 2022 11:03
@ghost ghost assigned jiasli Aug 2, 2022
@ghost ghost added this to the Aug 2022 (2022-09-06) milestone Aug 2, 2022
@ghost ghost added the Graph az ad label Aug 2, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Aug 2, 2022

role

@@ -115,6 +115,11 @@
The output includes credentials that you must protect. Be sure that you do not include these credentials
in your code or check the credentials into your source control. As an alternative, consider using
[managed identities](https://aka.ms/azadsp-managed-identities) if available to avoid the need to use credentials.

**Note:** This command resets the credentials of the Service Principal, not the App Registration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good catch! But I guess you put this statement at the wrong place? ad app credential reset does reset the credential of the application, not service principal.

The help message for az ad sp credential reset is here:

helps['ad sp credential'] = """
type: group
short-summary: Manage a service principal's credentials.
long-summary: The credential update will be applied on the Application object the service principal is associated with. In other words, you can accomplish the same thing using "az ad app credential"
"""

As for the behavior change, we called out in https://docs.microsoft.com/en-us/cli/azure/microsoft-graph-migration#az-ad-sp-credential

Comment on lines +120 to +121
As such, the credential shown in the output will be different from the credential shown in the portal under the App Registration pane.
Credentials of a Service Principal are not visable in the portal, only via the az cli or Microsoft Graph API.
Copy link
Member

@jiasli jiasli Aug 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to describe the behavior of Azure Portal since Azure Portal are subject to change, which is hard to maintain. Once Azure Portal changes its behavior, CLI's document will be outdated.

@FrankBoylan92
Copy link
Author

As per comments, closing pull request.

Same note is already in below doc:
https://docs.microsoft.com/en-us/cli/azure/microsoft-graph-migration#az-ad-sp-credential

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. Graph az ad
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants