Kamsiinov
Kamsiinov

Reputation: 1490

Azure ARM template add deployer object id to key vault access policies

I have a service principal which I am using to deploy key vault. How can I fetch that service principals object id automatically with ARM template similarly as I can fetch MSI object id with line:

"objectId": "[reference(concat('Microsoft.Web/sites/', variables('function')), '2018-02-01', 'Full').identity.principalId]",

Upvotes: 1

Views: 779

Answers (1)

4c74356b41
4c74356b41

Reputation: 72151

I dont think you can. Your only option would be to pass it from the level above (ie from the powershell script that is invoking the template). Also, if you want to do that just to read data from the Key Vault in the template - you don't need that. Advanced Access Policies do that instead.

Upvotes: 2

Related Questions