Reputation: 15
Full error message: "Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired. Failed to get resource ID for resource type 'Microsoft.Web/Sites' and resource name 'ProStrideSkating-api-dev'. Error: Could not fetch access token for Azure. Status code: invalid_client, status message: 7000222 - [2024-01-10 19:23:44Z]: AADSTS7000222: The provided client secret keys for app '***' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds.[error]Unhandled: Cannot read properties of undefined (reading 'getApplicationURL')"
So far, I followed the advice of both Error: Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired and Error: Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired. Failed to get resource ID
I've created a both a new token and a federated credential. When I try to update the "AzureAd": "Client Id" and "TenantId" with the updated credentials and rerun the pull request, I still get the same error message. I made sure to double check the "ClientId" and "TenantId" to make sure the credentials match the secret and the federated credential and they do.
Certificates and Secrets
Upvotes: 0
Views: 4793
Reputation: 15
Just had to update my pipeline with the new Service Principal Name, then it worked.
Upvotes: 0