Azure B2C custom policies age calculator considering leap years

Raphael ramos 41 Reputation points
2022-04-12T17:19:34.097+00:00

Hi!

I wonder if there is any way to calculate user's age considering leap years by using custom policies. I intend to implement a lightweight variation of the age-grouping custom policies.

Ideally, once it's handled, I could easily verify if the user is a minor or not:

Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
938 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,473 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 21,696 Reputation points Microsoft Employee
    2022-04-12T18:25:36.787+00:00

    Hi @Raphael ramos , are you talking about making this document more lightweight? You can implement age-gating straight forward like this and it takes leap years into consideration automatically. Why not use something that's already built in like this? Please let me know and I can help you further.

    Best,
    James