What does this error mean? New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest :…
- User
What does this error mean? New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest : The following policy rules failed: ["ExpirationRule"]
Assistant
This error occurs when you're trying to create a role assignment schedule request in Microsoft Entra ID (formerly Azure AD) using the PowerShell cmdlet
New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest, and the expiration settings don't meet the policy requirements.The "ExpirationRule" failure typically means one of these issues:
- You didn't specify an expiration time when one is required
- The expiration time you provided exceeds the maximum allowed duration
- The expiration format is incorrect
To fix this, make sure you're properly setting the expiration parameters in your request, such as:
- Including a valid
-ExpirationDateTimeparameter - Setting an expiration that complies with your organization's maximum role duration policy
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.