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

[Role] az ad sp create-for-rbac: Add alias --json-auth for --sdk-auth #26572

Merged
merged 3 commits into from
Jul 10, 2023

Conversation

MoChilia
Copy link
Member

@MoChilia MoChilia commented May 31, 2023

Related command

az ad sp create-for-rbac

Description

This PR is going to add alias --json-auth for the parameter --sdk-auth of the command az ad sp create-for-rbac.

As mentioned in #19872, --sdk-auth was deprecated since Python SDK has deprecated the usage of the output JSON file, there are still other places where this JSON file is used, like GitHub Action. To avoid confusion in naming, we introduce the alias --json-auth for --sdk-auth.

Some documents should be updated synchronously.

Close Azure/login#314

Testing Guide

az ad sp create-for-rbac --json-auth: with no deprecation message
az ad sp create-for-rbac --sdk-auth: still shows deprecation message

History Notes

az ad sp create-for-rbac: Add alias --json-auth for --sdk-auth


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

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented May 31, 2023

️✔️AzureCLI-FullTest
️✔️acr
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️acs
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.10
️✔️3.9
️✔️ams
️✔️latest
️✔️3.10
️✔️3.9
️✔️apim
️✔️latest
️✔️3.10
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.10
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.10
️✔️3.9
️✔️aro
️✔️latest
️✔️3.10
️✔️3.9
️✔️backup
️✔️latest
️✔️3.10
️✔️3.9
️✔️batch
️✔️latest
️✔️3.10
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.10
️✔️3.9
️✔️billing
️✔️latest
️✔️3.10
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.10
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.10
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.10
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.10
️✔️3.9
️✔️config
️✔️latest
️✔️3.10
️✔️3.9
️✔️configure
️✔️latest
️✔️3.10
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.10
️✔️3.9
️✔️container
️✔️latest
️✔️3.10
️✔️3.9
️✔️core
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️cosmosdb
️✔️latest
️✔️3.10
️✔️3.9
️✔️databoxedge
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️dla
️✔️latest
️✔️3.10
️✔️3.9
️✔️dls
️✔️latest
️✔️3.10
️✔️3.9
️✔️dms
️✔️latest
️✔️3.10
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.10
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.10
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.10
️✔️3.9
️✔️find
️✔️latest
️✔️3.10
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.10
️✔️3.9
️✔️identity
️✔️latest
️✔️3.10
️✔️3.9
️✔️iot
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️keyvault
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️kusto
️✔️latest
️✔️3.10
️✔️3.9
️✔️lab
️✔️latest
️✔️3.10
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.10
️✔️3.9
️✔️maps
️✔️latest
️✔️3.10
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.10
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.10
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.10
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.10
️✔️3.9
️✔️network
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.10
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.10
️✔️3.9
️✔️profile
️✔️latest
️✔️3.10
️✔️3.9
️✔️rdbms
️✔️latest
️✔️3.10
️✔️3.9
️✔️redis
️✔️latest
️✔️3.10
️✔️3.9
️✔️relay
️✔️latest
️✔️3.10
️✔️3.9
️✔️resource
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️role
️✔️latest
️✔️3.10
️✔️3.9
️✔️search
️✔️latest
️✔️3.10
️✔️3.9
️✔️security
️✔️latest
️✔️3.10
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.10
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.10
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.10
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.10
️✔️3.9
️✔️sql
️✔️latest
️✔️3.10
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.10
️✔️3.9
️✔️storage
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.10
️✔️3.9
️✔️telemetry
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️util
️✔️latest
️✔️3.10
️✔️3.9
️✔️vm
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented May 31, 2023

⚠️AzureCLI-BreakingChangeTest
⚠️role
is_break cmd_name rule_message suggest_message
⚠️False ad sp create-for-rbac cmd ad sp create-for-rbac update parameter show_auth_for_sdk: updated property name from show_auth_for_sdk to show_auth_in_json
⚠️False ad sp create-for-rbac cmd ad sp create-for-rbac update parameter show_auth_for_sdk: updated property options from ['--sdk-auth'] to ['--json-auth', '--sdk-auth']

@ghost ghost requested a review from yonzhan May 31, 2023 08:47
@ghost ghost added the Auto-Assign Auto assign by bot label May 31, 2023
@ghost ghost assigned jiasli May 31, 2023
@ghost ghost added the RBAC az role label May 31, 2023
@ghost ghost requested review from jsntcy and zhoxing-ms May 31, 2023 08:47
@ghost ghost assigned zhoxing-ms May 31, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented May 31, 2023

Role

@ghost ghost added the Web Apps az webapp label May 31, 2023
@ghost ghost requested a review from wangzelin007 May 31, 2023 08:47
@ghost ghost added Graph az ad Installation labels May 31, 2023
@MoChilia MoChilia changed the title {Role} az ad sp create-for-rbac: Add alias --json-auth for --sdk-auth [Role] az ad sp create-for-rbac: Add alias --json-auth for --sdk-auth May 31, 2023
@jiasli jiasli requested review from dcaro and Jacekey23 May 31, 2023 09:35
@MoChilia MoChilia linked an issue Jun 1, 2023 that may be closed by this pull request
c.argument('show_auth_in_json', options_list=['--sdk-auth', '--json-auth'],
deprecate_info=c.deprecate(target='--sdk-auth'),
help='Output service principal credential along with cloud endpoints in JSON format. '
'See https://learn.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli.',
Copy link
Member

Choose a reason for hiding this comment

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

We don't include /en-us in URLs in case this article supports multi-language in the future.

Comment on lines 184 to 185
help='Output service principal credential along with cloud endpoints in JSON format. '
'See https://learn.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli.',
Copy link
Member

@jiasli jiasli Jun 30, 2023

Choose a reason for hiding this comment

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

On a second thought, I think it may not be a good idea to include this URL. People who don't know what --sdk-auth does most likely don't need to use it as well. 🤣

If we do include the URL, please submit a PR to https://github.com/MicrosoftDocs/azure-docs-cli repo and link the PR ID here.

Or, maybe we should link to https://learn.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli at command level for better discovery.

@MoChilia
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@MoChilia MoChilia merged commit e8efb79 into Azure:dev Jul 10, 2023
avgale pushed a commit to avgale/azure-cli that referenced this pull request Aug 24, 2023
…-auth` (Azure#26572)

* Add alias `--json-auth` for `--sdk-auth` of `az ad sp create-for-rbac`

* update help information

* remove the url
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 Graph az ad Installation RBAC az role Web Apps az webapp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecation message in SP creation Alternative for --sdk-auth for login action
5 participants