Insufficient privileges to complete the operation on getting Application/Service principal via existing syntax
@jason-dou ci sta già lavorando.
Dal 19/9/2024.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Bicep version
Bicep CLI version 0.30.3 (2f0e78dcae)
Resource and API version
Microsoft.Graph/[email protected], Microsoft.Graph/[email protected]
Auth flow
automated, initially tested with Cloud Application Administrator role but after that I have added Global administrator. result is the same.
Deployment details
Insufficient privileges to complete the operation. Graph client request id: afff112b-8a8c-4f20-a1dd-9640b2a09d5e. Graph request timestamp: 2024-09-18T13:25:58Z. (Code: Forbidden)
Correlation ID: 7c517c2b-7f6a-4083-b50a-84365d8a1ebe
Describe the bug
To have successful deployment and service principal to be added as member to group.
To Reproduce
This should be minimum reproducible template. You need to enter information for your own environment,
extension microsoftGraph
param entraGroup object = {
name: 'ExampleGroup2'
type: 'Security'
displayName: 'Example Group 2'
mailNickname: 'exampleGroup2'
members: [
{
name: 'SomeName'
type: 'Application'
}
]
owners: []
}
var defaultMember = {
subscriptionId: subscription().subscriptionId
resourceGroup: ''
name: ''
appId: ''
}
resource memberManagedIdentities 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-07-31-preview' existing = [
for (member, i) in entraGroup.members: if (member.type =~ 'UserAssignedManagedIdentity') {
//https://github.com/Azure/bicep/issues/13937
name: empty(union(defaultMember, member).name) ? 'dummy${i}' : member.name
scope: resourceGroup(union(defaultMember, member).subscriptionId, union(defaultMember, member).resourceGroup)
}
]
resource memberApplications 'Microsoft.Graph/[email protected]' existing = [
for (member, i) in entraGroup.members: if (member.type =~ 'Application') {
//https://github.com/Azure/bicep/issues/13937
uniqueName: empty(union(defaultMember, member).name) ? 'dummy${i}' : member.name
}
]
resource memberServicePrincipals 'Microsoft.Graph/[email protected]' existing = [
for (member, i) in entraGroup.members: if (member.type =~ 'Application') {
appId: memberApplications[i].appId
}
]
resource memberServicePrincipalsStandalone 'Microsoft.Graph/[email protected]' existing = [
for (member, i) in entraGroup.members: if (member.type =~ 'ServicePrincipal') {
//https://github.com/Azure/bicep/issues/13937
appId: empty(union(defaultMember, member).appId) ? 'dummy${i}' : member.appId
}
]
resource memberGroups 'Microsoft.Graph/[email protected]' existing = [
for (member, i) in entraGroup.members: if (member.type =~ 'Group') {
//https://github.com/Azure/bicep/issues/13937
uniqueName: empty(union(defaultMember, member).name) ? 'dummy${i}' : member.name
}
]
resource entraGroupRes 'Microsoft.Graph/[email protected]' = {
uniqueName: entraGroup.name
displayName: entraGroup.displayName
mailEnabled: false
mailNickname: entraGroup.mailNickname
securityEnabled: true
description: null
members: [
for (member, i) in entraGroup.members: member.type =~ 'UserAssignedManagedIdentity'
? memberManagedIdentities[i].properties.principalId
: member.type =~ 'Application'
? memberServicePrincipals[i].id
: member.type =~ 'ServicePrincipal'
? memberServicePrincipalsStandalone[i].id
: member.type =~ 'Group' ? memberGroups[i].id : member.type =~ 'PrincipalId' ? member.principalId : ''
]
}
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
- 1h 21m
- PR unite (30g)
- 3
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 257 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
-
module-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
ports get and web print 'Port N already in use, trying next...' for every busy port they skipAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
appandflow/stim#1604 · 1 commento ·
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 92/100
lingdojo/kana-dojo#31060 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
SSH workspace restore rewrites relative symlinks into the deleted sync-back staging directoryAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
paperclipai/paperclip#14173 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno