Skip to content

Commit

Permalink
adding a membershipRule and membershipRuleProcessingState to the Micr…
Browse files Browse the repository at this point in the history
…osoft Graph under group

Signed-off-by: Hossein Rouhani <[email protected]>
  • Loading branch information
HRouhani committed May 15, 2024
1 parent 1b38ea7 commit 43f90b5
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 8 deletions.
18 changes: 10 additions & 8 deletions providers/ms365/resources/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,16 @@ func (a *mqlMicrosoft) groups() ([]interface{}, error) {
for _, grp := range grps {
graphGrp, err := CreateResource(a.MqlRuntime, "microsoft.group",
map[string]*llx.RawData{
"id": llx.StringDataPtr(grp.GetId()),
"displayName": llx.StringDataPtr(grp.GetDisplayName()),
"mail": llx.StringDataPtr(grp.GetMail()),
"mailEnabled": llx.BoolDataPtr(grp.GetMailEnabled()),
"mailNickname": llx.StringDataPtr(grp.GetMailNickname()),
"securityEnabled": llx.BoolDataPtr(grp.GetSecurityEnabled()),
"visibility": llx.StringDataPtr(grp.GetVisibility()),
"groupTypes": llx.ArrayData(llx.TArr2Raw(grp.GetGroupTypes()), types.String),
"id": llx.StringDataPtr(grp.GetId()),
"displayName": llx.StringDataPtr(grp.GetDisplayName()),
"mail": llx.StringDataPtr(grp.GetMail()),
"mailEnabled": llx.BoolDataPtr(grp.GetMailEnabled()),
"mailNickname": llx.StringDataPtr(grp.GetMailNickname()),
"securityEnabled": llx.BoolDataPtr(grp.GetSecurityEnabled()),
"visibility": llx.StringDataPtr(grp.GetVisibility()),
"groupTypes": llx.ArrayData(llx.TArr2Raw(grp.GetGroupTypes()), types.String),
"membershipRule": llx.StringDataPtr(grp.GetMembershipRule()),
"membershipRuleProcessingState": llx.StringDataPtr(grp.GetMembershipRuleProcessingState()),
})
if err != nil {
return nil, err
Expand Down
4 changes: 4 additions & 0 deletions providers/ms365/resources/ms365.lr
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ private microsoft.group @defaults("id displayName") {
members() []microsoft.user
// Group types indicating the membership and classification of the group
groupTypes []string
// Membership rule used for dynamic group membership
membershipRule string
// State of the processing for the dynamic membership rule
membershipRuleProcessingState string
}

// Microsoft domain
Expand Down
24 changes: 24 additions & 0 deletions providers/ms365/resources/ms365.lr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions providers/ms365/resources/ms365.lr.manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ resources:
mailEnabled: {}
mailNickname: {}
members: {}
membershipRule:
min_mondoo_version: latest
membershipRuleProcessingState:
min_mondoo_version: latest
securityEnabled: {}
visibility:
min_mondoo_version: 9.0.0
Expand Down

0 comments on commit 43f90b5

Please sign in to comment.