New‐PIMEntraRoleEligibleAssignment - kayasax/EasyPIM GitHub Wiki

Description:

Create an eligible assignement for $rolename and $principalID

Samples:

:large_blue_diamond: Create an eligible assignment for the role Acrpush, starting at a specific date and using default duration (the maximum allowed duration from the role settings)

    PS> New-PIMEntraRoleEligibleAssignment -tenantID $tenantID -rolename "AcrPush" -principalID 3604fe63-cb67-4b60-99c9-707d46ab9092 -startDateTime "2/2/2024 18:20"

:large_blue_diamond: Create a permanent eligible assignement for the role webmaster

   PS> New-PIMEntraRoleEligibleAssignment -tenantID $tenantID -rolename "webmaster" -principalID 3604fe63-cb67-4b60-99c9-707d46ab9092 -justification 'TEST' -permanent

Parameters:

Parameter description
$TenantID Entra ID TenantID
$rolename Subscription ID
$PrincipalID ID of the principal
$duration Assignment duration
$startDateTime specify the starting date if not set it will use curent time
[switch]$permanent create a permanent without expiration (must be allowed in role settings)
$justification Optional justification text