title: Azure Devops Service Connection failing on vnet peering on remote network, permissions issue?
body: <p>Running into an error with a deployment failing when pushing it out through an Azure Devops Release Pipeline creating a vnet peering.  </p>
  
  <p>I'm able to successfully push out the deployment as my own account (with permissions across both subscriptions) using New-AzResourceGroupDeployment and it deploys with no issues.</p>
  
  <p>I'm guessing it's down to the account not having permissions in the remote vnet as it's tied to just the first subscription.  Any one any ideas of a way around this one?</p>
  
  <p>Here's the redacted error I get from the failed deployment:</p>
  
  <pre><code>{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. 
  Please see https://aka.ms/DeployOperations for usage details.",
  "details":[{"code":"Forbidden","message":"{\r\n \"error\": {\r\n \"code\": \"LinkedAuthorizationFailed\",\r\n \"message\": \"The client 'myClientID' with object id 'myObjectID' has permission to perform action 'Microsoft.Network/virtualNetworks/virtualNetworkPeerings/write' on scope '/subscriptions/mySubid/resourcegroups/mylocalResourceGroup/providers/Microsoft.Network/virtualNetworks/mylocalResourceGroup-vnet/virtualNetworkPeerings/mylocalResourceGroup-vnetTouks-myRemoteResourceGroup-vnet'; 
  however, it does not have permission to perform action 'peer/action' on the linked scope(s) '/subscriptions/myRemoteSubId/resourceGroups/myremoteResourceGroup/providers/Microsoft.Network/virtualNetworks/myremoteResourceGroup-vnet' or the linked scope(s) are invalid.\"\r\n }\r\n}"}]}
  </code></pre>
  
  <p>Not too sure how I go about granting the service connection in my local user group permisions on the remote network?  </p>
  
  <p>Got this link to the permissions but not sure how to add them (network contributor) to the service connection
  <a href="https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-peering#permissions" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-peering#permissions</a></p>