RoleEligibilitySchedule.ReadWrite.Directory
Allows the app to read and manage the eligible role-based access control (RBAC) assignments and schedules for your company's directory, without a signed-in user. This includes managing eligible directory role membership, and reading directory role templates, directory roles and eligible memberships.
In short
RoleEligibilitySchedule.ReadWrite.Directory is available as both an application permission and a delegated permission in the Microsoft Graph API, grouped under the RoleEligibilitySchedule category. Allows the app to read and manage the eligible role-based access control (RBAC) assignments and schedules for your company's directory, without a signed-in user. This includes managing eligible directory role membership, and reading directory role templates, directory roles and eligible memberships. It grants read and write access to resources. Application permissions always require admin consent.
Permission Details
Read, update, and delete all eligible role assignments and schedules for your company's directory
Allows the app to read and manage the eligible role-based access control (RBAC) assignments and schedules for your company's directory, without a signed-in user. This includes managing eligible directory role membership, and reading directory role templates, directory roles and eligible memberships.
fee28b28-e1f3-4841-818e-2704dc62245f
Read, update, and delete all eligible role assignments for your company's directory
Allows the app to read and manage the eligible role-based access control (RBAC) assignments for your company's directory, on behalf of the signed-in user. This includes managing eligible directory role membership, and reading directory role templates, directory roles and eligible memberships.
62ade113-f8e0-4bf9-a6ba-5acb31db32fd
Properties
Properties is shown from stable Microsoft Graph v1.0 metadata.
| Property | Type | Description |
|---|---|---|
directory |
object |
|
entitlementManagement |
object |
Container for roles and assignments for entitlement management resources. |
JSON Representation
JSON representation is shown from stable Microsoft Graph v1.0 metadata.
{
"@odata.type": "#microsoft.graph.roleManagement"
}
Relationships
Relationships is shown from stable Microsoft Graph v1.0 metadata.
| Relationship | Type | Description |
|---|---|---|
directory |
rbacApplication |
Read-only. Nullable. |
entitlementManagement |
rbacApplication |
Container for roles and assignments for entitlement management resources. |
enterpriseApps |
rbacApplication collection |
Related enterpriseApps data exposed by this resource. |
Graph Methods
Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Microsoft Graph PowerShell beta commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Code Examples
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new UnifiedRoleEligibilityScheduleRequest
{
Action = UnifiedRoleScheduleRequestActions.AdminAssign,
Justification = "Assign Attribute Assignment Admin eligibility to restricted user",
RoleDefinitionId = "8424c6f0-a189-499e-bbd0-26c1753c96d4",
DirectoryScopeId = "/",
PrincipalId = "071cc716-8147-4397-a5ba-b2105951cc0b",
ScheduleInfo = new RequestSchedule
{
StartDateTime = DateTimeOffset.Parse("2022-04-10T00:00:00Z"),
Expiration = new ExpirationPattern
{
Type = ExpirationPatternType.AfterDateTime,
EndDateTime = DateTimeOffset.Parse("2024-04-10T00:00:00Z"),
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.RoleManagement.Directory.RoleEligibilityScheduleRequests.PostAsync(requestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const unifiedRoleEligibilityScheduleRequest = {
action: 'adminAssign',
justification: 'Assign Attribute Assignment Admin eligibility to restricted user',
roleDefinitionId: '8424c6f0-a189-499e-bbd0-26c1753c96d4',
directoryScopeId: '/',
principalId: '071cc716-8147-4397-a5ba-b2105951cc0b',
scheduleInfo: {
startDateTime: '2022-04-10T00:00:00Z',
expiration: {
type: 'afterDateTime',
endDateTime: '2024-04-10T00:00:00Z'
}
}
};
await client.api('/roleManagement/directory/roleEligibilityScheduleRequests')
.post(unifiedRoleEligibilityScheduleRequest);
Import-Module Microsoft.Graph.Identity.Governance
$params = @{
action = "adminAssign"
justification = "Assign Attribute Assignment Admin eligibility to restricted user"
roleDefinitionId = "8424c6f0-a189-499e-bbd0-26c1753c96d4"
directoryScopeId = "/"
principalId = "071cc716-8147-4397-a5ba-b2105951cc0b"
scheduleInfo = @{
startDateTime = [System.DateTime]::Parse("2022-04-10T00:00:00Z")
expiration = @{
type = "afterDateTime"
endDateTime = [System.DateTime]::Parse("2024-04-10T00:00:00Z")
}
}
}
New-MgRoleManagementDirectoryRoleEligibilityScheduleRequest -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.unified_role_eligibility_schedule_request import UnifiedRoleEligibilityScheduleRequest
from msgraph.generated.models.unified_role_schedule_request_actions import UnifiedRoleScheduleRequestActions
from msgraph.generated.models.request_schedule import RequestSchedule
from msgraph.generated.models.expiration_pattern import ExpirationPattern
from msgraph.generated.models.expiration_pattern_type import ExpirationPatternType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = UnifiedRoleEligibilityScheduleRequest(
action = UnifiedRoleScheduleRequestActions.AdminAssign,
justification = "Assign Attribute Assignment Admin eligibility to restricted user",
role_definition_id = "8424c6f0-a189-499e-bbd0-26c1753c96d4",
directory_scope_id = "/",
principal_id = "071cc716-8147-4397-a5ba-b2105951cc0b",
schedule_info = RequestSchedule(
start_date_time = "2022-04-10T00:00:00Z",
expiration = ExpirationPattern(
type = ExpirationPatternType.AfterDateTime,
end_date_time = "2024-04-10T00:00:00Z",
),
),
)
result = await graph_client.role_management.directory.role_eligibility_schedule_requests.post(request_body)
App Registration
Navigate to Azure Portal
Go to App registrations in Microsoft Entra admin center
Add API Permission
Select your app → API permissions → Add a permission → Microsoft Graph
Select Permission Type
Choose Application permissions or delegated permissions and search for RoleEligibilitySchedule.ReadWrite.Directory
Grant Admin Consent
Application permissions always require admin consent.
Frequently asked questions
What is the RoleEligibilitySchedule.ReadWrite.Directory Microsoft Graph permission?
RoleEligibilitySchedule.ReadWrite.Directory is available as both an application permission and a delegated permission in the Microsoft Graph API, grouped under the RoleEligibilitySchedule category. Allows the app to read and manage the eligible role-based access control (RBAC) assignments and schedules for your company's directory, without a signed-in user. This includes managing eligible directory role membership, and reading directory role templates, directory roles and eligible memberships. It grants read and write access to resources. Application permissions always require admin consent. It is mapped to the Microsoft Graph rolemanagement resource type. 22 documented Microsoft Graph REST methods require it. 20 Microsoft Graph PowerShell commands are documented for it.
Is RoleEligibilitySchedule.ReadWrite.Directory an application or a delegated permission?
RoleEligibilitySchedule.ReadWrite.Directory is available as both an application permission (app-only access, no signed-in user) and a delegated permission (access on behalf of a signed-in user).
Does RoleEligibilitySchedule.ReadWrite.Directory require admin consent?
Application permissions always require admin consent.
What is the permission ID (GUID) for RoleEligibilitySchedule.ReadWrite.Directory?
For RoleEligibilitySchedule.ReadWrite.Directory, the application (app role) ID is fee28b28-e1f3-4841-818e-2704dc62245f, and the delegated (OAuth2 scope) ID is 62ade113-f8e0-4bf9-a6ba-5acb31db32fd. These are the real Microsoft Graph identifiers and can be used directly in an app registration manifest.