Azure Ad B2C - Ms Graph - user lock/unlock - Enable/Disable

juni dev 361 Reputation points
2022-11-02T10:08:43.133+00:00

Hi,

I'm implementing an API for AzureAd B2C user management.
on My requirements the API needs operation to Enable/disable user and also lock/unlock.

I'm already able to Enable/disable via MsGraph by setting AccountEnabled=true/false.
Is there an attribute for account lock/unlock?

when the user exceeds the limit of wrong password will then be disabled or locked?
what about smart lockout? does it affects a specific attribute I can read/set?

Thanks,
JD

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Graph
{count} votes

Accepted answer
  1. Sandeep G-MSFT 20,906 Reputation points Microsoft Employee Moderator
    2022-11-24T04:56:54.017+00:00

    @juni dev

    There is no account lockout concept in a complete Managed Domain scenario, i.e in case you have your all cloud users, then AAD, is the authority that handles your authentication. In this case, there is nothing called Account Lockout. If a cloud only user makes bad password attempts, the Smart Lockout feature engages and forbades the user from making further attempt to login. It governs the lockdown period based on its algorithm.

    When the account gets locked, it means the account is blocked from signing. Once we toggle Block sign in option to 'Yes', it basically changes the value of AccountEnabled attribute to False. You can check this via Graph API (https://developer.microsoft.com/en-us/graph/graph-explorer)

    1. Login to graph explorer with Global Admin account by clicking on "Sign in with Microsoft" button.
    2. Make a GET call > https://graph.microsoft.com/beta/users/USERNAME@YOUR_TENANT.onmicrosoft.com?$select=accountEnabled
    3. If you want to fetch this information about all users in your tenant, use > https://graph.microsoft.com/beta/users?$select=displayname,accountEnabled

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    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 Answers by the question author, which helps users to know the answer solved the author's problem.