Output parameters for user-assigned-identity in bicep?
Asked Answered
M

1

2

I'm trying to retrieve the Client ID of a Managed Identity created with Azure Bicep. But the documentation doesn't give any information about the output parameters. Am I missing something? How can I retrieve the client id after defining the Managed Identity in bicep ?

Mathews answered 2/3, 2023 at 9:40 Comment(0)
G
4

The clientId is available on the properties of the identity:

param identityName string

resource identity 'Microsoft.ManagedIdentity/userAssignedIdentities@2022-01-31-preview' = {
  name: identityName
  location: resourceGroup().location
}

output clientId string = identity.properties.clientId
Gauvin answered 2/3, 2023 at 18:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.