This example shows how to get an access token for a Postman client application when using the Authorization Code with PKCE grant type.
Required information
-
The information supplied by the identity provider upon registering Power BI as a client application:
-
Token URL
-
Issuer URL
-
Authorization URL
-
Client ID
-
Client Secret (if required by your identity provider)
-
Scope
-
State (if required by your identity provider)
-
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, Issuer, and Authorization URLs 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.
-
Enter the name of the access token variable in the Token Name field.
-
For Grant Type, select Authorization Code (With PKCE).
-
For Callback URL, enter https://www.getpostman.com/oauth2/callback.
-
For Code Challenge Method, select SHA-256.
-
For Client Authentication, select Send client credentials in body.
-
For the remaining fields, enter the information supplied by your identity provider.
If the scope value was created by Intergraph Smart© Cloud Portal, you must remove the text ingr.api from the value. For example:
-
Scope created by Smart Cloud Portal: E5CD0128-899F-4001-9494-63BF79067346 ingr.api
-
Scope to use in the query: E5CD0128-899F-4001-9494-63BF79067346
-
-
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.