title: How to pass Managed Identity Object ID to KeyVault template in Azure Blueprints
body: <p>So, I am trying to spin up a <code>Managed Identity</code> and a <code>KeyVault</code> using <code>Blueprints</code>. I have an individually working template for each. My endgoal is to spin up both resources along with a few more together in the same blueprint. The issue I'm having is that I need to pass my Managed Identity's object ID to the KeyVault template during deployment. I have the blueprint setup to deploy the managed identity resource group, then the managed identity, followed by the keyvault group and keyvault.</p>
  
  <p>The deployment is working till the KV resource group and then failing during deployment of keyvault. Does anyone have any insight on how to do this? </p>
  
  <p>Below are 2 pics that show the layout of the blueprint and also the section of the keyvault template where the object Id is needed.</p>
  
  <p><strong>Azure Blueprint Layout:</strong><br>
  <img src="https://i.stack.imgur.com/Yqjzu.png" alt="Azure Blueprint Layout"></p>
  
  <p><strong>KeyVault Template where access policy to managed Identity is located:</strong><br>
  <img src="https://i.stack.imgur.com/Rqgls.png" alt="KeyVault Template where access policy to managed Identity is located"></p>
  
  <p><strong>Error Pic:</strong><br>
  <img src="https://i.stack.imgur.com/lDaJ1.png" alt="Error Pic"></p>
  
  <p><strong>Pic of the error on the next page after I click view deployment details:</strong>
  <img src="https://i.stack.imgur.com/uHMwb.png" alt="Pic of the error on the next page after i click view deployment details"></p>