Skip to content

How to add Access Policies to Key Vault, when adding App Service? I need "Principal ID" of added App Service. #3747

Answered by brwilkinson
motycak asked this question in Q&A
Discussion options

You must be logged in to vote

Adding either User assigned or System assigned managed identity to the Web site is an optional configuration.

To use User assigned you pre-create the identity then assign it, to use System assigned you simply enable it.

https://docs.microsoft.com/en-us/azure/templates/microsoft.web/staticsites?tabs=bicep#ManagedServiceIdentity

Since you are not providing that configuration item when you create your website that property is not available to read back.

Syntax:

  identity: {
    type: 'string'
    userAssignedIdentities: {}
  }

The mimimum you need for system assigned is

  identity: {
    type: 'SystemAssigned'
}

Otherwise for user assigned or mixed

  identity: {
    type: 'SystemAssigned, U…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@motycak
Comment options

Answer selected by motycak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants