Unable to perform az login.

Anonymous
2025-12-10T17:03:43.46+00:00

When I am doing az login, it shares the code to authenticate on [ https://microsoft.com/devicelogin]

Once I enter the code and select my microsoft account, I am getting below error.

You don't have access to this

Your sign-in was successful but does not meet the criteria to access this resource. For example, you might be signing in from a browser, app, location, or an authentication flow that is restricted by your admin.
User's image

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
0 comments No comments

Answer accepted by question author
Rukmini 43,995 Reputation points Microsoft External Staff Moderator
2025-12-10T17:32:59.25+00:00

Hello Laveena Fulwani, As discussed offline, please check with the Admin as this error usually occurs if the Admin has created conditional access.

As confirmed by you, there is a conditional access policy created and hence the error.

If the resolution was helpful, kindly take a moment to accept the answer and upvote it 👍 it as a token of appreciation.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

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.