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.
Yes, It is possible to fetch user profile using client_id
and
client_secret
using application only permissions. To achieve this you need to use Client credential flow and MS Graph.
Since,
Please go through the Github sample which can help to achieve the same.