-
Notifications
You must be signed in to change notification settings - Fork 557
Mpoulson/6117 - AADPIMGroupSetting - Adds support for Entra PIM Group Settings #6121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mpoulson
wants to merge
4
commits into
microsoft:Dev
Choose a base branch
from
mpoulson:mpoulson/6117-pr
base: Dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
# Change log for Microsoft365DSC | ||
# UNRELEASED | ||
|
||
* AADPIMGroupSetting | ||
* [#6117] Initial relase. | ||
|
||
# 1.25.521.1 | ||
|
||
|
1,570 changes: 1,570 additions & 0 deletions
1,570
Modules/Microsoft365DSC/DSCResources/MSFT_AADPIMGroupSetting/MSFT_AADPIMGroupSetting.psm1
Large diffs are not rendered by default.
Oops, something went wrong.
56 changes: 56 additions & 0 deletions
56
...s/Microsoft365DSC/DSCResources/MSFT_AADPIMGroupSetting/MSFT_AADPIMGroupSetting.schema.mof
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[ClassVersion("1.0.0.0"), FriendlyName("AADPIMGroupSetting")] | ||
class MSFT_AADPIMGroupSetting : OMI_BaseResource | ||
{ | ||
[Key, Description("RuleDefinition DisplayName")] String DisplayName; | ||
[Key, Description("The identifier of the membership or ownership eligibility to the group that is governed by PIM. Required. The possible values are: owner, member. Supports $filter (eq)."), ValueMap{"owner","member"}, Values{"owner","member"}] String RoleDefinitionId; | ||
[Write, Description("Specifies the Group Policy Id.")] String Id; | ||
[Write, Description("Activation maximum duration (hours).")] String ActivationMaxDuration; | ||
[Write, Description("Require justification on activation (True/False)")] Boolean ActivationReqJustification; | ||
[Write, Description("Require ticket information on activation (True/False)")] Boolean ActivationReqTicket; | ||
[Write, Description("Require MFA on activation (True/False)")] Boolean ActivationReqMFA; | ||
[Write, Description("Require approval to activate (True/False)")] Boolean ApprovaltoActivate; | ||
[Write, Description("Approver User UPN and/or Group Displayname")] String ActivateApprover[]; | ||
[Write, Description("Allow permanent eligible assignment (True/False)")] Boolean PermanentEligibleAssignmentisExpirationRequired ; | ||
[Write, Description("Expire eligible assignments after (Days)")] String ExpireEligibleAssignment; | ||
[Write, Description("Allow permanent active assignment (True/False)")] Boolean PermanentActiveAssignmentisExpirationRequired; | ||
[Write, Description("Expire active assignments after (Days)")] String ExpireActiveAssignment; | ||
[Write, Description("Require Azure Multi-Factor Authentication on active assignment (True/False)")] Boolean AssignmentReqMFA; | ||
[Write, Description("Require justification on active assignment (True/False)")] Boolean AssignmentReqJustification; | ||
[Write, Description("Require Azure Multi-Factor Authentication on eligible assignment (True/False)")] Boolean ElegibilityAssignmentReqMFA; | ||
[Write, Description("Require justification on eligible assignment (True/False)")] Boolean ElegibilityAssignmentReqJustification; | ||
[Write, Description("Send notifications when members are assigned as eligible to this group: Group assignment alert, default recipient (True/False)")] Boolean EligibleAlertNotificationDefaultRecipient; | ||
[Write, Description("Send notifications when members are assigned as eligible to this group: Group assignment alert, additional recipient (UPN)")] String EligibleAlertNotificationAdditionalRecipient[]; | ||
[Write, Description("Send notifications when members are assigned as eligible to this group: Group assignment alert, only critical Email (True/False)")] Boolean EligibleAlertNotificationOnlyCritical; | ||
[Write, Description("Send notifications when members are assigned as eligible to this group: Notification to the assigned user (assignee), default recipient (True/False)")] Boolean EligibleAssigneeNotificationDefaultRecipient; | ||
[Write, Description("Send notifications when members are assigned as eligible to this group: Notification to the assigned user (assignee), additional recipient (UPN)")] String EligibleAssigneeNotificationAdditionalRecipient[]; | ||
[Write, Description("Send notifications when members are assigned as eligible to this group: Notification to the assigned user (assignee), only critical Email (True/False)")] Boolean EligibleAssigneeNotificationOnlyCritical; | ||
[Write, Description("Send notifications when members are assigned as eligible to this group: Request to approve a group assignment renewal/extension, default recipient (True/False)")] Boolean EligibleApproveNotificationDefaultRecipient; | ||
[Write, Description("Send notifications when members are assigned as eligible to this group: Request to approve a group assignment renewal/extension, additional recipient (UPN)")] String EligibleApproveNotificationAdditionalRecipient[]; | ||
[Write, Description("Send notifications when members are assigned as eligible to this group: Request to approve a group assignment renewal/extension, only critical Email (True/False)")] Boolean EligibleApproveNotificationOnlyCritical; | ||
[Write, Description("Send notifications when members are assigned as active to this group: Group assignment alert, default recipient (True/False)")] Boolean ActiveAlertNotificationDefaultRecipient; | ||
[Write, Description("Send notifications when members are assigned as active to this group: Group assignment alert, additional recipient (UPN)")] String ActiveAlertNotificationAdditionalRecipient[]; | ||
[Write, Description("Send notifications when members are assigned as active to this group: Group assignment alert, only critical Email (True/False)")] Boolean ActiveAlertNotificationOnlyCritical; | ||
[Write, Description("Send notifications when members are assigned as active to this group: Notification to the assigned user (assignee), default recipient (True/False)")] Boolean ActiveAssigneeNotificationDefaultRecipient; | ||
[Write, Description("Send notifications when members are assigned as active to this group: Notification to the assigned user (assignee), additional recipient (UPN)")] String ActiveAssigneeNotificationAdditionalRecipient[]; | ||
[Write, Description("Send notifications when members are assigned as active to this group: Notification to the assigned user (assignee), only critical Email (True/False)")] Boolean ActiveAssigneeNotificationOnlyCritical; | ||
[Write, Description("Send notifications when members are assigned as active to this group: Request to approve a group assignment renewal/extension, default recipient (True/False)")] Boolean ActiveApproveNotificationDefaultRecipient; | ||
[Write, Description("Send notifications when members are assigned as active to this group: Request to approve a group assignment renewal/extension, additional recipient (UPN)")] String ActiveApproveNotificationAdditionalRecipient[]; | ||
[Write, Description("Send notifications when members are assigned as active to this group: Request to approve a group assignment renewal/extension, only critical Email (True/False)")] Boolean ActiveApproveNotificationOnlyCritical; | ||
[Write, Description("Send notifications when eligible members activate this group: Group assignment alert, default recipient (True/False)")] Boolean EligibleAssignmentAlertNotificationDefaultRecipient; | ||
[Write, Description("Send notifications when eligible members activate this group: Group assignment alert, additional recipient (UPN)")] String EligibleAssignmentAlertNotificationAdditionalRecipient[]; | ||
[Write, Description("Send notifications when eligible members activate this group: Group assignment alert, only critical Email (True/False)")] Boolean EligibleAssignmentAlertNotificationOnlyCritical; | ||
[Write, Description("Send notifications when eligible members activate this group: Notification to activated user (requestor), default recipient (True/False)")] Boolean EligibleAssignmentAssigneeNotificationDefaultRecipient; | ||
[Write, Description("Send notifications when eligible members activate this group: Notification to activated user (requestor), additional recipient (UPN)")] String EligibleAssignmentAssigneeNotificationAdditionalRecipient[]; | ||
[Write, Description("Send notifications when eligible members activate this group: Notification to activated user (requestor), only critical Email (True/False)")] Boolean EligibleAssignmentAssigneeNotificationOnlyCritical; | ||
[Write, Description("Authorization context is required (True/False)")] Boolean AuthenticationContextRequired; | ||
[Write, Description("Descriptive name of associated authorization context")] String AuthenticationContextName; | ||
[Write, Description("Authorization context id")] String AuthenticationContextId; | ||
[Write, Description("Specify if the Azure AD group setting should exist or not."), ValueMap{"Present"}, Values{"Present"}] String Ensure; | ||
[Write, Description("Credentials for the Microsoft Graph delegated permissions."), EmbeddedInstance("MSFT_Credential")] string Credential; | ||
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; | ||
[Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; | ||
[Write, Description("Secret of the Azure Active Directory application to authenticate with."), EmbeddedInstance("MSFT_Credential")] String ApplicationSecret; | ||
[Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; | ||
[Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; | ||
[Write, Description("Access token used for authentication.")] String AccessTokens[]; | ||
}; |
7 changes: 7 additions & 0 deletions
7
Modules/Microsoft365DSC/DSCResources/MSFT_AADPIMGroupSetting/Readme.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# AADPIMGroupSetting | ||
|
||
## Description | ||
|
||
This resource configure existing PIM Groups. All UI parameters can be configured using this resource like: | ||
- Notifications | ||
- require approval / ticket / justification / MFA |
71 changes: 71 additions & 0 deletions
71
Modules/Microsoft365DSC/DSCResources/MSFT_AADPIMGroupSetting/settings.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"resourceName": "AADPIMGroupSetting", | ||
"description": "This resource configures an PIM Group.", | ||
"roles": { | ||
"read": [], | ||
"update": [ | ||
"Privileged Role Administrator" | ||
] | ||
}, | ||
"permissions": { | ||
"graph": { | ||
"delegated": { | ||
"read": [ | ||
{ | ||
"name": "Group.Read.All" | ||
}, | ||
{ | ||
"name": "RoleManagementPolicy.Read.AzureADGroup" | ||
}, | ||
{ | ||
"name": "PrivilegedEligibilitySchedule.Read.AzureADGroup" | ||
}, | ||
{ | ||
"name": "User.Read.All" | ||
} | ||
], | ||
"update": [ | ||
{ | ||
"name": "Group.Read.All" | ||
}, | ||
{ | ||
"name": "RoleManagementPolicy.ReadWrite.AzureADGroup" | ||
}, | ||
{ | ||
"name": "User.Read.All" | ||
} | ||
] | ||
}, | ||
"application": { | ||
"read": [ | ||
{ | ||
"name": "Group.Read.All" | ||
}, | ||
{ | ||
"name": "RoleManagementPolicy.Read.AzureADGroup" | ||
}, | ||
{ | ||
"name": "PrivilegedEligibilitySchedule.Read.AzureADGroup" | ||
}, | ||
{ | ||
"name": "User.Read.All" | ||
} | ||
], | ||
"update": [ | ||
{ | ||
"name": "Group.Read.All" | ||
}, | ||
{ | ||
"name": "RoleManagementPolicy.ReadWrite.AzureADGroup" | ||
}, | ||
{ | ||
"name": "RoleManagementPolicy.ReadWrite.AzureADGroup" | ||
}, | ||
{ | ||
"name": "User.Read.All" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
75 changes: 75 additions & 0 deletions
75
Modules/Microsoft365DSC/Examples/Resources/AADPIMGroupSetting/1-Create.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<# | ||
This example is used to test new resources and showcase the usage of new resources being worked on. | ||
It is not meant to use as a production baseline. | ||
#> | ||
|
||
Configuration Example | ||
{ | ||
param( | ||
[Parameter()] | ||
[System.String] | ||
$ApplicationId, | ||
|
||
[Parameter()] | ||
[System.String] | ||
$TenantId, | ||
|
||
[Parameter()] | ||
[System.String] | ||
$CertificateThumbprint | ||
) | ||
Import-DscResource -ModuleName Microsoft365DSC | ||
|
||
node localhost | ||
{ | ||
AADPIMGroupSetting "AADPIMGroupSetting-test-group_owner" | ||
{ | ||
ActivateApprover = @(); | ||
ActivationMaxDuration = "PT8H"; | ||
ActivationReqJustification = $True; | ||
ActivationReqMFA = $False; | ||
ActivationReqTicket = $false; | ||
ActiveAlertNotificationAdditionalRecipient = @(); | ||
ActiveAlertNotificationDefaultRecipient = $True; | ||
ActiveAlertNotificationOnlyCritical = $False; | ||
ActiveApproveNotificationAdditionalRecipient = @("[email protected]"); | ||
ActiveApproveNotificationDefaultRecipient = $True; | ||
ActiveApproveNotificationOnlyCritical = $False; | ||
ActiveAssigneeNotificationAdditionalRecipient = @(); | ||
ActiveAssigneeNotificationDefaultRecipient = $False; | ||
ActiveAssigneeNotificationOnlyCritical = $False; | ||
ApprovaltoActivate = $True; | ||
AssignmentReqJustification = $True; | ||
AssignmentReqMFA = $False; | ||
AuthenticationContextId = ""; | ||
AuthenticationContextRequired = $false; | ||
DisplayName = "test-group"; | ||
ElegibilityAssignmentReqJustification = $False; | ||
ElegibilityAssignmentReqMFA = $False; | ||
EligibleAlertNotificationAdditionalRecipient = @(); | ||
EligibleAlertNotificationDefaultRecipient = $True; | ||
EligibleAlertNotificationOnlyCritical = $False; | ||
EligibleApproveNotificationAdditionalRecipient = @(); | ||
EligibleApproveNotificationDefaultRecipient = $True; | ||
EligibleApproveNotificationOnlyCritical = $False; | ||
EligibleAssigneeNotificationAdditionalRecipient = @(); | ||
EligibleAssigneeNotificationDefaultRecipient = $False; | ||
EligibleAssigneeNotificationOnlyCritical = $False; | ||
EligibleAssignmentAlertNotificationAdditionalRecipient = @(); | ||
EligibleAssignmentAlertNotificationDefaultRecipient = $True; | ||
EligibleAssignmentAlertNotificationOnlyCritical = $False; | ||
EligibleAssignmentAssigneeNotificationAdditionalRecipient = @(); | ||
EligibleAssignmentAssigneeNotificationDefaultRecipient = $True; | ||
EligibleAssignmentAssigneeNotificationOnlyCritical = $False; | ||
ExpireActiveAssignment = "P180D"; | ||
ExpireEligibleAssignment = "P365D"; | ||
PermanentActiveAssignmentisExpirationRequired = $True; | ||
PermanentEligibleAssignmentisExpirationRequired = $True; | ||
RoleDefinitionId = "owner"; | ||
ApplicationId = $ApplicationId | ||
TenantId = $TenantId | ||
CertificateThumbprint = $CertificateThumbprint | ||
Ensure = "Present"; | ||
} | ||
} | ||
} |
75 changes: 75 additions & 0 deletions
75
Modules/Microsoft365DSC/Examples/Resources/AADPIMGroupSetting/2-Update.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<# | ||
This example is used to test new resources and showcase the usage of new resources being worked on. | ||
It is not meant to use as a production baseline. | ||
#> | ||
|
||
Configuration Example | ||
{ | ||
param( | ||
[Parameter()] | ||
[System.String] | ||
$ApplicationId, | ||
|
||
[Parameter()] | ||
[System.String] | ||
$TenantId, | ||
|
||
[Parameter()] | ||
[System.String] | ||
$CertificateThumbprint | ||
) | ||
Import-DscResource -ModuleName Microsoft365DSC | ||
|
||
Node localhost | ||
{ | ||
AADPIMGroupSetting "AADPIMGroupSetting-test-group_owner" | ||
{ | ||
ActivateApprover = @(); | ||
ActivationMaxDuration = "PT8H"; | ||
ActivationReqJustification = $True; | ||
ActivationReqMFA = $False; | ||
ActivationReqTicket = $false; | ||
ActiveAlertNotificationAdditionalRecipient = @(); | ||
ActiveAlertNotificationDefaultRecipient = $True; | ||
ActiveAlertNotificationOnlyCritical = $False; | ||
ActiveApproveNotificationAdditionalRecipient = @("[email protected]"); | ||
ActiveApproveNotificationDefaultRecipient = $True; | ||
ActiveApproveNotificationOnlyCritical = $False; | ||
ActiveAssigneeNotificationAdditionalRecipient = @(); | ||
ActiveAssigneeNotificationDefaultRecipient = $False; | ||
ActiveAssigneeNotificationOnlyCritical = $False; | ||
ApprovaltoActivate = $True; | ||
AssignmentReqJustification = $True; | ||
AssignmentReqMFA = $False; | ||
AuthenticationContextId = ""; | ||
AuthenticationContextRequired = $false; | ||
DisplayName = "test-group"; | ||
ElegibilityAssignmentReqJustification = $False; | ||
ElegibilityAssignmentReqMFA = $False; | ||
EligibleAlertNotificationAdditionalRecipient = @(); | ||
EligibleAlertNotificationDefaultRecipient = $True; | ||
EligibleAlertNotificationOnlyCritical = $False; | ||
EligibleApproveNotificationAdditionalRecipient = @(); | ||
EligibleApproveNotificationDefaultRecipient = $True; | ||
EligibleApproveNotificationOnlyCritical = $False; | ||
EligibleAssigneeNotificationAdditionalRecipient = @(); | ||
EligibleAssigneeNotificationDefaultRecipient = $False; | ||
EligibleAssigneeNotificationOnlyCritical = $False; | ||
EligibleAssignmentAlertNotificationAdditionalRecipient = @(); | ||
EligibleAssignmentAlertNotificationDefaultRecipient = $True; | ||
EligibleAssignmentAlertNotificationOnlyCritical = $False; | ||
EligibleAssignmentAssigneeNotificationAdditionalRecipient = @(); | ||
EligibleAssignmentAssigneeNotificationDefaultRecipient = $True; | ||
EligibleAssignmentAssigneeNotificationOnlyCritical = $False; | ||
ExpireActiveAssignment = "P180D"; | ||
ExpireEligibleAssignment = "P365D"; | ||
PermanentActiveAssignmentisExpirationRequired = $False; | ||
PermanentEligibleAssignmentisExpirationRequired = $False; | ||
RoleDefinitionId = "owner"; | ||
ApplicationId = $ApplicationId | ||
TenantId = $TenantId | ||
CertificateThumbprint = $CertificateThumbprint | ||
Ensure = "Present"; | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.