You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this example is excellent for use-Cases where the User-ID is known, or the App ID is known. Maybe i am too dumb using bicep but i have trouble with assigning;
multiple Groups, identified by Names and multiple Users, identified by Names to a group as members...
`
//names, or Guids separated by ,
param owner string
var ownerarray = split(owner, ',')
//names, or Guids separated by ,
param member string
var memberarray = split(member, ',')
var groups= [
{
name:'G1'
description:'Desc1'
}
{
name:'G2'
description:'Desc2'
}
]
module Gruppenbesitzer '../modules/user.bicep' = [for own in ownerarray: {
name:'owners-${own}'
params:{
userPrincipalName:own
}
}]
module Gruppenmitglieder '../modules/user.bicep' = [for mem in memberarray: {
name:'members-${mem}'
params:{
userPrincipalName:mem
}
}]
module groups '../modules/group.bicep' =[for (group,i ) in groups: {
name:'somegroup-${i}'
params:{
displayName: group.name
mailEnabled: false
mailNickname: group.name
securityEnabled: true
uniqueName: gruppe.name
owners:[for j in range(0, length(ownerarray)): Gruppenbesitzer[j].outputs.userid] //-> how do i add Groups here, as a whole?
members:[for k in range(0, length(memberarray)): Gruppenmitglieder[k].outputs.userid] //-> how do i add Groups here, as a whole?
description:gruppe.description
}
}]`
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
related to:
https://github.com/microsoftgraph/msgraph-bicep-types/tree/main/quickstart-templates/security-group-add-user-members
this example is excellent for use-Cases where the User-ID is known, or the App ID is known. Maybe i am too dumb using bicep but i have trouble with assigning;
multiple Groups, identified by Names and multiple Users, identified by Names to a group as members...
`
//names, or Guids separated by ,
param owner string
var ownerarray = split(owner, ',')
//names, or Guids separated by ,
param member string
var memberarray = split(member, ',')
var groups= [
{
name:'G1'
description:'Desc1'
}
{
name:'G2'
description:'Desc2'
}
]
module Gruppenbesitzer '../modules/user.bicep' = [for own in ownerarray: {
name:'owners-${own}'
params:{
userPrincipalName:own
}
}]
module Gruppenmitglieder '../modules/user.bicep' = [for mem in memberarray: {
name:'members-${mem}'
params:{
userPrincipalName:mem
}
}]
module groups '../modules/group.bicep' =[for (group,i ) in groups: {
name:'somegroup-${i}'
params:{
displayName: group.name
mailEnabled: false
mailNickname: group.name
securityEnabled: true
uniqueName: gruppe.name
owners:[for j in range(0, length(ownerarray)): Gruppenbesitzer[j].outputs.userid] //-> how do i add Groups here, as a whole?
members:[for k in range(0, length(memberarray)): Gruppenmitglieder[k].outputs.userid] //-> how do i add Groups here, as a whole?
description:gruppe.description
}
}]`
Beta Was this translation helpful? Give feedback.
All reactions