Search code examples
bearer-tokenazure-authenticationazure-ad-b2cclaims-authentication

Identify users login type like Sign up or Sign In


We created Sign Up and Sign In userflow for our B2C application to authenticate users.

Everything is working fine. But I want to categorize signed in users and signed up users.

I checked the logs but there is no much difference. How to identify who are new users and who are existing users?

PS: Userflow is Sign Up and Sign In with username

EDIT: I am unable to get new flag in token claims even after adding application claim


Solution

  • There is a User is new (newUser) claim available within the Sign-up or sign-in policy that you can enable:

    enter image description here

    This will add the "newUser" flag to your token and it is true when the user sign up for the first time.