Skip to content

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
wants to merge 4 commits into
base: Dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
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

Expand Down

Large diffs are not rendered by default.

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[];
};
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
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"
}
]
}
}
}
}
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";
}
}
}
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";
}
}
}
Loading