In Postman I am trying to generate Access token using Oauth2.0 for MS fabric Update API call.
I have entered below details
POST .0/token
Under Authorization: I selected Oauth2.0
Configure New Token Token Name: test
Grant type: Authorization Code
Callback URL: http://localhost
Auth URL: .0/authorize
Access Token URL: .0/token
Client ID: *** Client Secret: *** Scope: /.default
Refresh Token URL .0/token
In Azure AD App Registration I have set- Web Redirect URI: http://localhost
When I click "Get New Access Token" I get error as below
"error": "invalid_request", "error_description": "AADSTS900144: The request body must contain the following parameter: 'grant_type'. Trace ID: ** Correlation ID: ** Timestamp: 2025-02-19 07:33:46Z", "error_codes": [ 900144 ], "error_uri": "; }
GET /**/oauth2/v2.0/authorize?response_type=code&client_id=3**ac&scope=https%3A%2F%2Fapi.fabric.microsoft%2F.default&redirect_uri=http%3A%2F%2Flocalhost 302 POST /**/oauth2/v2.0/token%0A 400 559 ms Error: Could not complete OAuth 2.0 token request
Screenshot
In Postman I am trying to generate Access token using Oauth2.0 for MS fabric Update API call.
I have entered below details
POST https://login.microsoftonline/tenant-ID/oauth2/v2.0/token
Under Authorization: I selected Oauth2.0
Configure New Token Token Name: test
Grant type: Authorization Code
Callback URL: http://localhost
Auth URL: https://login.microsoftonline/Tenant-ID/oauth2/v2.0/authorize
Access Token URL: https://login.microsoftonline/Tenant-ID/oauth2/v2.0/token
Client ID: *** Client Secret: *** Scope: https://api.fabric.microsoft/.default
Refresh Token URL https://login.microsoftonline/Tenant-ID/oauth2/v2.0/token
In Azure AD App Registration I have set- Web Redirect URI: http://localhost
When I click "Get New Access Token" I get error as below
"error": "invalid_request", "error_description": "AADSTS900144: The request body must contain the following parameter: 'grant_type'. Trace ID: ** Correlation ID: ** Timestamp: 2025-02-19 07:33:46Z", "error_codes": [ 900144 ], "error_uri": "https://login.microsoftonline/error?code=900144" }
GET https://login.microsoftonline/**/oauth2/v2.0/authorize?response_type=code&client_id=3**ac&scope=https%3A%2F%2Fapi.fabric.microsoft%2F.default&redirect_uri=http%3A%2F%2Flocalhost 302 POST https://login.microsoftonline/**/oauth2/v2.0/token%0A 400 559 ms Error: Could not complete OAuth 2.0 token request
Screenshot
Share Improve this question edited 10 hours ago VLAZ 29.1k9 gold badges62 silver badges84 bronze badges asked 21 hours ago SalmanSalman 1,8676 gold badges15 silver badges28 bronze badges 7 | Show 2 more comments1 Answer
Reset to default 0I am using Postman web version to generate the access token
Created a Microsoft Entra ID application and configured redirect URI as WEB:
As I am using Postman web version, I configured redirect URI as https://oauth.pstmn.io/v1/browser-callback
. If you are making use of Postman app then configure it as https://oauth.pstmn.io/v1/callback
Now I generated the tokens, selecting OAuth 2.0 under Authorization:
Token Name: test
Grant type : Authorization Code
Callback URL : RedirectURL
Auth URL : https://login.microsoftonline/TenantID/oauth2/v2.0/authorize
Access Token URL : https://login.microsoftonline/TenantID/oauth2/v2.0/token
ClientID : ClientID
Client Secret : ***
Scope : https://api.fabric.microsoft/.default openid offline_access
Refresh Token URL : https://login.microsoftonline/TenantID/oauth2/v2.0/token
When I clicked on Get New Access Token, I got the sign-in screen:
I got tokens successfully:
In the screenshot you have added, I can see you have pasted the token URL in the POST. Try to remove and check.
If still the issue persists, open a new request and configure the new token request.
https://oauth.pstmn.io/v1/callback
and check click on browser in postman and allow the pop-up in browser – Rukmini Commented 20 hours ago