Error when using deployment API - ManagedIdentityCredential authentication unavailable.

  • Updated

While using the deployment API you may see the following error. 

ManagedIdentityCredential authentication unavailable. Multiple attempts failed to obtain a token from the managed identity endpoint.

If this does not happen locally, but does happen in Azure DevOps the service principal may be used because the task is of type Azure PowerShell instead of just PowerShell.


  1. Check to see if the task is of type Azure PowerShell or PowerShell.
  2. If it is Azure PowerShell, change it to PowerShell. This connects to the PaaS portal verses connecting directly to the app service, thereby avoiding service principal usage which is no longer supported for deployments.