Insufficient privileges to complete the operation on getting Application/Service principal via existing syntax
@jason-dou ya está trabajando en esto.
Desde el 19/9/2024.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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?
- Lenguaje dominante
- TypeScript
- Estrellas
- 80
- Forks
- 15
- Merge medio
- 1 h 21 min
- PR fusionados (30 d)
- 3
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoftgraph/msgraph-bicep-types
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
microsoftgraph/msgraph-bicep-types#311 · 3 comentarios ·
-
enhancement new type
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
microsoftgraph/msgraph-bicep-types#304 · 3 comentarios · 1 reacción ·
-
enhancement new type
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
microsoftgraph/msgraph-bicep-types#296 · 2 reacciones ·
-
Issue with servicePrincipals and appRoleAssignedTo in some Entra TenantsQuizá libre de nuevo @eketo-msft la tomó hace 257 días y no hay ningún pull request abierto. Abiertobug
microsoftgraph/msgraph-bicep-types#275 · 5 comentarios · 1 asignado ·
Todos los issues de microsoftgraph/msgraph-bicep-types
Issues similares
-
Resources: New palettes of MacaoAbiertoresources
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
railmapgen/rmg-palette#2445 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
danielmiessler/LifeOS#2242 ·
Los mantenedores suelen responder en 5 días
-
good first issue hacktoberfest help wanted translation
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
callstackincubator/appduct#129 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100