What I am testing
In order to force MFA, I created a very simple Azure conditional access policy:
What I get
But this rule never applied.
What I did
I tester from WhatIf tool and from running Connect-AzAccount either.
When testing I discovered that if I apply:
This time whatIf is triggered.
My question
Could anybody explain me this behavior? What I should do this?
Thanks
after watching your question, I started testing MFA in my tenant. I followed this document and it worked finally, and hope it would help you.
I created a test tenant for this scenario, and in azure ad, I need to disable Security default first, this doc show the operation.
And according to your description, it seems that your configuration didn't work, I assume that you may miss some steps. When adding Conditional Access policy, you need to add policy name, then choose affect scope(users and groups), select Cloud apps or actions(e.g. choose Microsoft Azure Management so the policy applies to sign-in events to the Azure portal), and you need to check the box for Require multi-factor authentication under Access controls->Grant.
Here's my configuration. And when I signed in azure portal with test user, it asked me to use phone to prove myself.