mirror of
https://github.com/azure/login.git
synced 2026-03-15 09:20:56 -04:00
Add critical information if manually creating SP Credential object (#209)
* Add critical information if manually creating SP Credential object If you must manually create the credential JSON (for instance, the Service Principal was created and assigned but the output credential was not saved), finding the `clientId`, `clientSecret`, `subscriptionId` and `tenantId` in azure is possible, but the `resourceManagerEndpointUrl` is also required by this Action and was much harder to track down. By explaining it is possible and including the value for the public azure cloud (the default use case) it will help others be able to use this Action with existing Service Principal's as well. * Update README.md Co-authored-by: Balaga Gayatri <balaga-gayatri@github.com>
This commit is contained in:
@@ -207,11 +207,13 @@ Follow the steps to configure Azure Service Principal with a secret:
|
||||
|
||||
# The command should output a JSON object similar to this:
|
||||
|
||||
|
||||
{
|
||||
"clientId": "<GUID>",
|
||||
"clientSecret": "<GUID>",
|
||||
"subscriptionId": "<GUID>",
|
||||
"tenantId": "<GUID>",
|
||||
"resourceManagerEndpointUrl": <URL>
|
||||
(...)
|
||||
}
|
||||
|
||||
@@ -219,6 +221,10 @@ Follow the steps to configure Azure Service Principal with a secret:
|
||||
* Now in the workflow file in your branch: `.github/workflows/workflow.yml` replace the secret in Azure login action with your secret (Refer to the example above)
|
||||
* Note: The above `az ad sp create-for-rbac` command will give you the `--sdk-auth` deprecation warning. As we are working with CLI for this deprecation process, we strongly recommend users to use this `--sdk-auth` flag as the result dictionary output changes and not accepted by login action if `--sdk-auth` is not used.
|
||||
|
||||
### Manually creating the Credentials object
|
||||
|
||||
If you already created and assigned a Service Principal in Azure you can manually create the .json object above by finding the `clientId` and `clientSecret` on the Service Principal, and your `subscriptionId` and `tenantId` of the subscription and tenant respectively. The `resourceManagerEndpointUrl` will be `https://management.azure.com/` if you are using the public Azure cloud.
|
||||
|
||||
### Configure a service principal with a Federated Credential to use OIDC based authentication:
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user