Skip to main content

role_management_policies

Creates, updates, deletes, gets or lists a role_management_policies resource.

Overview

Namerole_management_policies
TypeResource
Identra_id.policies.role_management_policies

Fields

The following fields are returned by SELECT queries:

Retrieved navigation property

NameDatatypeDescription
idstringThe unique identifier for an entity. Read-only.
descriptionstringDescription for the policy.
displayNamestringDisplay name for the policy.
effectiveRulesarrayThe list of effective rules like approval rules and expiration rules evaluated based on inherited referenced rules. For example, if there is a tenant-wide policy to enforce enabling an approval rule, the effective rule will be to enable approval even if the policy has a rule to disable approval. Supports $expand.
isOrganizationDefaultbooleanThis can only be set to true for a single tenant-wide policy which will apply to all scopes and roles. Set the scopeId to / and scopeType to Directory. Supports $filter (eq, ne).
lastModifiedByThe identity who last modified the role setting.
lastModifiedDateTimestring (date-time)The time when the role setting was last modified. (pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$)
rulesarrayThe collection of rules like approval rules and expiration rules. Supports $expand.
scopeIdstringThe identifier of the scope where the policy is created. Can be / for the tenant or a group ID. Required.
scopeTypestringThe type of the scope where the policy is created. One of Directory, DirectoryRole, Group. Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectunified_role_management_policy_idRetrieve the details of a role management policy.
listselectGet the details of the policies in PIM that can be applied to Microsoft Entra roles or group membership or ownership. To retrieve policies that apply to Azure RBAC, use the Azure REST PIM API for role management policies.
insertinsert
updateupdateunified_role_management_policy_id
deletedeleteunified_role_management_policy_idIf-Match

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
unified_role_management_policy_idstringThe unique identifier of unifiedRoleManagementPolicy
If-MatchstringETag

SELECT examples

Retrieve the details of a role management policy.

SELECT
id,
description,
displayName,
effectiveRules,
isOrganizationDefault,
lastModifiedBy,
lastModifiedDateTime,
rules,
scopeId,
scopeType
FROM entra_id.policies.role_management_policies
WHERE unified_role_management_policy_id = '{{ unified_role_management_policy_id }}' -- required
;

INSERT examples

No description available.

INSERT INTO entra_id.policies.role_management_policies (
id,
description,
displayName,
isOrganizationDefault,
lastModifiedBy,
lastModifiedDateTime,
scopeId,
scopeType,
effectiveRules,
rules
)
SELECT
'{{ id }}',
'{{ description }}',
'{{ displayName }}',
{{ isOrganizationDefault }},
'{{ lastModifiedBy }}',
'{{ lastModifiedDateTime }}',
'{{ scopeId }}',
'{{ scopeType }}',
'{{ effectiveRules }}',
'{{ rules }}'
RETURNING
id,
description,
displayName,
effectiveRules,
isOrganizationDefault,
lastModifiedBy,
lastModifiedDateTime,
rules,
scopeId,
scopeType
;

UPDATE examples

No description available.

UPDATE entra_id.policies.role_management_policies
SET
id = '{{ id }}',
description = '{{ description }}',
displayName = '{{ displayName }}',
isOrganizationDefault = {{ isOrganizationDefault }},
lastModifiedBy = '{{ lastModifiedBy }}',
lastModifiedDateTime = '{{ lastModifiedDateTime }}',
scopeId = '{{ scopeId }}',
scopeType = '{{ scopeType }}',
effectiveRules = '{{ effectiveRules }}',
rules = '{{ rules }}'
WHERE
unified_role_management_policy_id = '{{ unified_role_management_policy_id }}' --required
RETURNING
id,
description,
displayName,
effectiveRules,
isOrganizationDefault,
lastModifiedBy,
lastModifiedDateTime,
rules,
scopeId,
scopeType;

DELETE examples

No description available.

DELETE FROM entra_id.policies.role_management_policies
WHERE unified_role_management_policy_id = '{{ unified_role_management_policy_id }}' --required
AND If-Match = '{{ If-Match }}'
;