microsoftgraph / microsoftgraph/msgraph-bicep-types
Microsoft.Graph/groups@v1.0 fails to PATCH a group
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 80
- Forks
- 15
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 3
Description
Bicep version
az bicep version
Bicep CLI version 0.29.47 (132ade51bc)
Resource and API version
Microsoft.Graph/groups@v1.0
Auth flow
Interactive, az cli credentials.
Deployment details
Start time: 9/3/2024, 2:49:11 PM
Correlation ID: f07c3c47-2b07-43d0-8f1c-cee3379419a9
Graph client request id: 79e9a036-7856-485a-be8e-c0c5eb19f282
Graph request timestamp: 2024-09-03T11:49:11Z
Describe the bug
Graph api call the resource provider in question fails with status code 400. Graph documentation states that this means the generated request is malformed. The same request used to work 8/30/2024, 12:57:43.709 PM. See attached picture. The bicep code responsible for generating the request is attached below.
"details":[
{
"code":"",
"message":"{\"error\":{\"code\":\"BadRequest\",\"target\":\"/resources/adminGroup\",\"message\":\"Unexpected segment DynamicPathSegment. Expected property/$value. Graph client request id: 79e9a036-7856-485a-be8e-c0c5eb19f282. Graph request timestamp: 2024-09-03T11:49:11Z.\"}}"
}
]
Failing bicep resource definition:
var adminUniqueName = 'my-fake-group-name'
resource adminGroup 'Microsoft.Graph/groups@v1.0' = {
description: 'Administrators of the ${organisation} ${environment} database'
displayName: '${organisation} ${environment} Database Admins'
isAssignableToRole: false
securityEnabled: true
uniqueName: adminUniqueName
mailEnabled: false
mailNickname: adminUniqueName
members: [
applicationIdentityId
'93a2f6e5-3f48-476d-a685-e9136a5e6cd2'
]
}
Generated ARM:
"adminGroup": {
"import": "microsoftGraph",
"type": "Microsoft.Graph/groups@v1.0",
"properties": {
"description": "[format('Administrators of the {0} {1} database', parameters('organisation'), parameters('environment'))]",
"displayName": "[format('{0} {1} Database Admins', parameters('organisation'), parameters('environment'))]",
"isAssignableToRole": false,
"securityEnabled": true,
"uniqueName": "[variables('adminUniqueName')]",
"mailEnabled": false,
"mailNickname": "[variables('adminUniqueName')]",
"members": [
"[parameters('applicationIdentityId')]",
"93a2f6e5-3f48-476d-a685-e9136a5e6cd2"
]
}
}
To Reproduce
Deploy a group several times several times (might work on first deploy, it's a graph PATCH that fails.
Additional context
Azure Portal deployments UI cannot handle this situation. It fails to load any child resources for the failed deployment. Crash happens in react, there is no failed network calls.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.