This example shows how to get an access token for a Postman client application when using the Client Credentials grant type.
Required information
-
The information supplied by the identity provider upon registering Power BI as a client application:
-
Token URL
-
Client ID
-
Client Secret (if required by your identity provider)
-
Scope
-
For the Smart Cloud environment, this information is supplied by the Smart Cloud support team when they respond to the request to register Postman as a client.
-
For other environments, you can get the Token URL from the configuration endpoint for your identity provider:
<idp_hostname>/<idp_baseurl>/.well-known/openid-configuration
-
Get the access token
-
Create a Postman collection for accessing the web API and define a variable to hold the access token for the collection.
-
Go to the Authorization section.
-
For Type, select OAuth 2.0.
-
For Token Name, enter the name of the access token variable.
-
For Grant Type, select Client Credentials.
-
For Client Authentication, select Send client credentials in body.
-
For the remaining fields, enter the information supplied by your identity provider.
-
Click Get New Access Token.
-
If required, sign in using your Smart Completions credentials.
If the request succeeds, you receive an access token.
Copy the access token from the response
-
Copy the access token from the response.
-
Paste the access token into the CURRENT VALUE column for the access token variable you defined.
-
Now, you can use the access token to request a resource.