Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Bug with the error generated from accidentally using the a managed Identity Client ID instead of the Principal ID

Aperta
#229 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@jason-dou ci sta già lavorando.

Dal 6/3/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug graph-platform triaged

Bicep version
0.33.93

Resource and API version
Microsoft.Graph/groups - v1.0:0.1.9-preview

Auth flow
signed-in user

Deployment details
Creating a group with an assigned member

Describe the bug
I recently attempted a group deployment using the Client ID of a managed Identity as a member of the group and got the error: An unexpected 'EndOfInput' node was found when reading from the JSON reader. A 'StartObject' node was expected.

Finally, I figured out that this was not the actual error. Obviously, this error must be happening somewhere down the road, but the true error was that I was accidentally passing the Client ID into the members array instead of the Principal ID.

To Reproduce
Steps to reproduce the behavior:

resource updatedGroup 'Microsoft.Graph/[email protected]' = {
    uniqueName: <uniqueName>
    displayName: <displayName>
    mailEnabled: false
    mailNickname: <mailNickname>
    securityEnabled: true
    members: [
      <Put a Client ID here>
    ]
  }

Additional context
bicepconfig.json extensions node

"extensions": {
    "microsoftGraphV1": "br:mcr.microsoft.com/bicep/extensions/microsoftgraph/v1.0:0.1.9-preview"
}

Here is my full template

@secure()
param managedIdentityId string

var groupArray = loadJsonContent('../azure.json', 'databases')

extension microsoftGraphV1

// Reference existing group and its current members
resource existingGroup 'Microsoft.Graph/[email protected]' existing = [ 
  for (group, i) in groupArray: {
    uniqueName: group.permissionsGroup
  }
]

// Merge existing members with new members (avoids duplicates)
resource updatedGroup 'Microsoft.Graph/[email protected]' = [
  for (group, i) in groupArray: {
    uniqueName: group.permissionsGroup
    displayName: group.permissionsGroup
    mailEnabled: false
    mailNickname: group.permissionsGroup
    securityEnabled: true
    members: [
      managedIdentityId
    ]
    dependsOn: [
      existingGroup[i]
    ]
  }
]
Lingua principale
TypeScript
Stelle
81
Fork
15
Merge medio
3g 8h
PR unite (30g)
7

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoftgraph/msgraph-bicep-types

Tutte le issue di microsoftgraph/msgraph-bicep-types

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.