Reputation: 3025
Is there a way either in powershell or Postman to get access of myself either through login to particular tenant. I see lot of samples around getting access token either client ID or secret. But I want to run either commands or make REST call to get access token once myself get authenticated.I tried looking into graph explorer but no luck .
Upvotes: 0
Views: 1426
Reputation: 16438
The client id is required for AAD authorization.
If you want to get an access token including your own information, you should implement OAuth 2.0 authorization code flow. It will perform interactive login as @Gaurav Mantri-AIS mentioned.
We can simply get the access token in Postman like this:
After clicking on "Request Token", it will pop up a login window. Enter your username and password. Then you will get the access token.
When we log into Graph explorer, we will see the access token here:
In fact, Microsoft has registered an Azure AD application and provided the client id in the login request URL.
In short, we have to use the client id.
Upvotes: 1