Bug with the error generated from accidentally using the a managed Identity Client ID instead of the Principal ID
@jason-dou 已经在做这个了。
开始于 2025年3月6日。
评估
这个 Issue 还没有评估数据。
描述
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]
]
}
]
- 主要语言
- TypeScript
- 星标
- 81
- 派生
- 15
- 平均合并
- 3 天 11 小时
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoftgraph/msgraph-bicep-types 的其他 Issue
-
bug
难度 4/5 3-5 天 新手友好度 12/100
microsoftgraph/msgraph-bicep-types#328 · 1 个 reaction ·
-
bug
难度 4/5 3-5 天 新手友好度 25/100
-
Intermittent servicePrincipal creation failure with OwnedBy: backing application must be in local tenant despite being created there可能已有人在做 @FehintolaObafemi 于 9 天前认领。 未关闭Needs: Attention :wave:
难度 4/5 3-5 天 新手友好度 42/100
microsoftgraph/msgraph-bicep-types#324 · 3 条评论 · 已指派 1 人 ·
-
Docs: Add note about full-name + uniqueName requirement to applications/federatedIdentityCredentials未关闭
难度 1/5 1 小时以内 新手友好度 35/100
-
bug
难度 4/5 3-5 天 新手友好度 55/100
microsoftgraph/msgraph-bicep-types#311 · 3 条评论 ·
查看 microsoftgraph/msgraph-bicep-types 的全部 Issue
相似的 Issue
-
Add: ESP 2 RO未关闭approved check:passed streams:add
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
ipaas: Configure form shows "Deploy to apply." and "Overrides selected Link" when they don't apply未关闭
难度 2/5 1-3 小时 新手友好度 67/100
wso2/integration-control-plane#1118 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
UTDNebula/utd-notebook#311 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复