unable to activate my PIM role using PowerShell using New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest. It keeps failing with "policy rules failed: ["MfaRule"]

CassidyKevinJOIT-5987 20 Reputation points
2025-09-05T18:56:04.79+00:00

I issue connect-mggraph and interactively sign in. When I call the New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest cmdlet, It returns an error:

New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest_Create: The following policy rules failed: ["MfaRule"]

Status: 400 (BadRequest)

ErrorCode: RoleAssignmentRequestPolicyValidationFailed

and the sign in logs show sign in error 500186 - user not allowed by policy conditions with Additional details showing "user needs to perform multi factor authentication"
however, i wasnt prompted for any additional MFA. I have the Authenticator app, but there is no prompt to check it for sign in.

Microsoft Security | Microsoft Entra | Microsoft Entra ID

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    3 deleted comments

    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.