title: Azure DevOps unable to deploy to Azure Web App
body: <p>Am currently trying to deploy an app from a Release Pipeline under Azure DevOps owned by Company A to an Azure App hosted on Azure owned by Company B.</p>
  
  <p>Keep on getting this error when attempting to release stop the Azure App:</p>
  
  <blockquote>
    <p>Error: Failed to get resource ID for resource type
    'Microsoft.Web/Sites' and resource name 'AppName'. Error: Could not
    fetch access token for Managed Service Principal. Please configure
    Managed Service Identity (MSI) for virtual machine
    '<a href="https://aka.ms/azure-msi-docs" rel="noreferrer">https://aka.ms/azure-msi-docs</a>'. Status code: 400, status message: Bad
    Request</p>
  </blockquote>
  
  <p>Am at a loss on how to solve this.</p>
  
  <p>What has been done so far:</p>
  
  <ul>
  <li>Web App is created in Azure of Company B</li>
  <li>User from DevOps Company A Account is added as Guest User in Company Azure AD</li>
  <li>User has Contributor rights on the Web App</li>
  <li>Managed Service Identity is set to "On" on Web App</li>
  <li>The subscription of Company B and Web Apps can be seen and selected when setting up the release in Azure DevOps.</li>
  </ul>
  
  <p>Am quite sure that more needs to be in order for the release deployment to work, but after an intensive search, I was not able to find anything.</p>
  
  <p>Hope anyone here can advise.</p>