Skip to content

Fix: AuthMethodsPolicyMigration for newer tenants #1567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

ngms-psh
Copy link
Contributor

Tenants which are newly created have the policy migration 'completed' by default. On these tenants, the property policyMigrationState from graph endpoint /beta/policies/authenticationMethodsPolicy is always NULL. Even if you set policyMigrationState to migrationComplete with a PATCH request, the value will remain NULL. In the Entra portal for these tenants, the migration option is also not shown since they are already using the new authentication methods policy.

I have a few tenants where this is the case, causing the alerts and report to show incorrectly.

This PR updates the logic to treat null values as "migration complete" to align with Microsoft's behavior for newly created tenants.

@KelvinTegelaar KelvinTegelaar merged commit 0345b5c into KelvinTegelaar:dev Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants