Documentation: https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity#obtain-tokens-for-azure-resources
Changes in the new version:
- MSI_ENDPOINT -> IDENTITY_ENDPOINT
- MSI_SECRET -> IDENTITY_HEADER
- "secret" header replaced by "X-IDENTITY-HEADER"
- "clientid" parameter -> "client_id"
- params for user-assigned identity object id ("principal_id") and resource ID ("mi_res_id")
- expires_on is epoch seconds
For example:
curl "$IDENTITY_ENDPOINT?resource=https://vault.azure.net&api-version=2019-08-01" -H "X-IDENTITY-HEADER: $IDENTITY_HEADER"
Response:
{
"access_token": "***",
"expires_on": "1597772135",
"resource": "https://vault.azure.net",
"token_type": "Bearer",
"client_id": "9eba17f1-..."
}
Documentation: https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity#obtain-tokens-for-azure-resources
Changes in the new version:
For example:
Response:
{ "access_token": "***", "expires_on": "1597772135", "resource": "https://vault.azure.net", "token_type": "Bearer", "client_id": "9eba17f1-..." }