What ID can I use for the signed in user using passport-azure-ad?

181 Views Asked by At

I am adding Microsoft Account authentication to my web application. We need to store extra information about the signed in user to a DB. What id can I use for the user to associate this data with? I am assuming it is either the oid, tid, or sub.

1

There are 1 best solutions below

0
On BEST ANSWER

You should use the user account OID or a combination of that and another property as its OID is globally unique.