-
Notifications
You must be signed in to change notification settings - Fork 62
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
Azure CLI --sdk-auth is getting deprecated #129
Comments
So what do you suggest using instead of passing I.e. what replaces?
And is this just a docs change or does code need to change also? I suspect the former? cc @zechenbit |
There is no alternative to JSON with flag {
"clientId": "",
"clientSecret": "",
"subscriptionId": "",
"tenantId": "",
"activeDirectoryEndpointUrl": "",
"resourceManagerEndpointUrl": "",
"activeDirectoryGraphResourceId": "",
"sqlManagementEndpointUrl": "",
"galleryEndpointUrl": "",
"managementEndpointUrl": ""
} JSON without flag {
"appId": "",
"displayName": "",
"password": "",
"tenant": ""
} So, the SUBSCRIPTION_ID="YOUR_SUBSCRIPTION_ID"
az ad sp create-for-rbac --role Contributor --scopes "/subscriptions/$SUBSCRIPTION_ID" \
> $HOME/Downloads/client_credentials.json |
/add label: helpwanted |
Thanks @d0pare for raising this and putting useful information together. I found some related discussions in Azure CLI repository:
Per their discussion (Azure/azure-cli#21693 (comment)), the If it is just the naming, then maybe we can just change our fileToEnvMap: https://github.com/inlets/cloud-provision/blob/master/provision/azure.go#L35 The |
Azure example in this documentation uses
--sdk-auth
flag to generate credentials. But Microsoft documentation shows that it is deprecated.Currently, azure cloud provision uses
NewEnvironmentCredential
that crafts credentials from environment variables previously set from the JSON access token file. A possible alternative is to use ClientSecretCredential and initialize it from the new JSON file that is returned if--sdk-auth
is not specified.New JSON file sample:
The text was updated successfully, but these errors were encountered: