Hi @Chirag
There are several methods to distinguish between personal and work accounts:
- By authorization code
The authorization code for both is an opaque string, but the authorization code for work accounts is usually long, while the authorization code for personal accounts is short.
- By user id
Try to call the /me
endpoint and find the user id. You will find that the user id of the work account is in GUID format, and the user id of the personal account is just a string instead of GUID.
- By access token.
The access token for the work account uses the standard JWT format and can be decoded by jwt.io. The access token for the personal account is a specially encrypted token, not in JWT format.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.