Azure AD B2C - Set Custom Password Expiry for Select Users

Anonymous
2022-05-18T16:09:20.103+00:00

Hey,

I am looking for a way to set custom password expiry date for select users in B2C using C#.

So far as per this official MS docs I found that we can only do that at the Tenant level using "Set-MsolPasswordPolicy" cmdlet.

I am using C# and Microsoft.Graph.GraphServiceClient to manage B2C users.

Please let me know if there is a way to set a custom Password Expiry for Select Users.

Thanks

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,575 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,639 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. 2022-05-18T17:46:06.037+00:00

    Hello @Anonymous , per user custom password expiration datetime is not possible in Azure AD or Azure AD B2C. You can howevever enforce it programmatically checking the user lastPasswordChangeDateTime property to decide if the password needs to be updated.

    Let us know if this answer was helpful to you or if you need additional assistance. If it was helpful, please remember to accept it so that others in the community with similar questions can more easily find a solution.