Bug with the error generated from accidentally using the a managed Identity Client ID instead of the Principal ID
@jason-dou ci sta già lavorando.
Dal 6/3/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoftgraph/msgraph-bicep-types
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
microsoftgraph/msgraph-bicep-types#311 · 3 commenti ·
-
enhancement new type
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
microsoftgraph/msgraph-bicep-types#304 · 3 commenti · 1 reazione ·
-
enhancement new type
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
microsoftgraph/msgraph-bicep-types#296 · 2 reazioni ·
-
Issue with servicePrincipals and appRoleAssignedTo in some Entra TenantsForse di nuovo libera @eketo-msft l’ha presa 259 giorni fa e non c’è nessuna pull request aperta. Apertabug
microsoftgraph/msgraph-bicep-types#275 · 5 commenti · 1 assegnatario ·
Tutte le issue di microsoftgraph/msgraph-bicep-types
Issue simili
-
triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
mermaid-js/mermaid-live-editor#2053 ·
I maintainer di solito rispondono entro 1 giorno
-
factory
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
jessepollak/home#1455 ·
I maintainer di solito rispondono entro 1 giorno
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
lingdojo/kana-dojo#31227 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
mobile: device viewer shows dark status bar icons on its dark backdrop in light mode (Android)Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
appandflow/stim#1838 ·
I maintainer di solito rispondono entro 1 giorno