Pipeline Fails: AzureCLI task Run Preflight Validation

Copper Contributor

Hello everyone,


My pipeline is failing the AzureCLI PreFlight validation with the following error>


ERROR: {"code": "AuthorizationFailed", "message": "The client '' with object id '' does not have authorization to perform action 'Microsoft.Resources/deployments/validate/action' over scope '/subscriptions/' or the scope is invalid. If access was recently granted, please refresh your credentials."} ##[error]Script failed with exit code: 1[command]C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd" account clear" ##[section]Finishing: Run Preflight Validation


The SPN has been granted Owner role the Subscription.


Any other ideas? I am deploying this Repo AnalyticsinaBox/src/bicep-deployment/Pattern3 at main · Azure/AnalyticsinaBox · GitHub


Confirm that Service Connectors are in-place and I am subscription owner.


It does appear to be a permissions issue and I am unable to solve.


thank you,



0 Replies