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

juni dev 336 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 Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,522 questions
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,633 questions
{count} votes

Accepted answer
  1. Sandeep G-MSFT 14,241 Reputation points Microsoft Employee
    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful