Insufficient privileges to complete the operation - groups with isAssignableToRole set to True
@jason-dou ci sta già lavorando.
Dal 13/6/2024.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Bicep version
Run bicep --version via the Bicep CLI, az bicep version via the AZ CLI
PS: ~:bicep --version
Bicep CLI version 0.28.1 (ba1e9f8c1e)
PS: ~:az bicep version
Bicep CLI version 0.28.1 (ba1e9f8c1e)
Resource and API version
Which Microsoft.Graph resource and API version has the issue?
Microsoft.Graph/[email protected]
Auth flow
Is the deployment interactive (e.g. with a signed in user) or automated (e.g. with an application)?
Both - ServicePrincipal and Signed in user
Deployment details
If it's related to deployment failures, please provide the deployment correlation id, Microsoft Graph client request id, and deployment timestamp if applicable.
{
"status": "Failed",
"error": {
"code": "DeploymentFailed",
"target": "/subscriptions/xxxx-xxxxx-xxxxx-xxxxx/providers/Microsoft.Resources/deployments/entraid-sec-groups-test",
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.",
"details": [
{
"code": "",
"message": "{\"error\":{\"code\":\"Forbidden\",\"target\":\"/resources/role_tier1Analyst\",\"message\":\"Insufficient privileges to complete the operation. Graph client request id: 9335c582-d847-49e8-9079-3e4a89a5d2e0. Graph request timestamp: 2024-06-13T11:59:32Z.\"}}"
}
]
}
}
Describe the bug
For Microsoft.Graph/groups resource type when using the property isAssignableToRole set to true, which requires an additional permission for the signed in user/service principal fails even tough the permission is granted.
From the Groups doc: https://learn.microsoft.com/en-us/graph/templates/reference/groups?view=graph-bicep-1.0
Only callers in Global Administrator and Privileged Role Administrator roles can set this property. The caller must also be assigned the RoleManagement.ReadWrite.Directory permission to set this property or update the membership of such groups.
The service principal I'm using is granted the following Microsoft Graph permissions:
- Directory.ReadWrite.All
- Group.ReadWrite.All
- RoleManagement.ReadWrite.Directory
It works fine to deploy a group without the property isAssignableToRole set to true. That would mean the permissions are in effect I would believe?
In addition to the Microsoft Graph permissions the service principal have the Entra ID role Privileged Role Administrator which is also a prerequisite.
To Reproduce
- Create ServicePrincipal with Microsoft graph application permissions: 'RoleManagement.ReadWrite.Directory', 'Group.ReadWrite.All', 'Directory.ReadWrite.All' (Remember Global Admin consent)
- Create a
Microsoft.Graph/groupsresource:
targetScope = 'subscription'
provider microsoftGraph
resource groupExample 'Microsoft.Graph/[email protected]' = {
displayName: 'Example Group'
description: 'Example Group'
isAssignableToRole: true
mailEnabled: false
mailNickname: 'example-group'
securityEnabled: true
uniqueName: 'example-group'
}
az login --service-principal --username '1234' --password '1234' --tenant '1234'
az deployment sub create --name 'entraid-sec-groups-test' --template-file .\{filename}.bicep --location 'NorwayEast'
Additional context
Add any other context about the problem here. For example, what permissions does the identity have if it's a permission issue?
- Lingua principale
- TypeScript
- Stelle
- 80
- Fork
- 15
- Merge medio
- 3g 8h
- PR unite (30g)
- 7
Preparare l'ambiente
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 258 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
-
Add: Digi World (Romania) SDApertacheck:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Fission-AI/OpenSpec#1986 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
nestjs/docs.nestjs.com#3554 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
publicodes/publicodes#868 ·
-
namespace operations
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
EclipseFdn/open-vsx.org#13488 ·
I maintainer di solito rispondono entro 2 giorni