I have requirement where i have to store client_id and client_secret in database, before storing in database i have to validate given client_id and client_secret, If i am able to fetch username by client_id and client_secret than i can compare user given username and username from Microsoft if both are matching than i am good to store in database.
Note : I can fetch userprofile by using access_token but this is not i am looking for.