Error: Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired!
I was doing a quick deploy to my Azure-hosted Optimizely CMS 12 website, using Azure DevOps Pipelines, for the 237th time when this error popped up.
For me, it was not obvious how to fix this problem, but the solution is found at docs.microsoft.com.
Go to Project settings > Service connections, and then select the service connection you want to modify.
Select Edit in the upper-right corner, and then select Verify.