Unauthorized Error When Generating Access Token via Postman

Input Request:
curl --location 'https://auth.brightspace.com/core/connect/token' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=client_credentials' --data-urlencode 'client_id=72f31814---**-1c168ffe32d3' --data-urlencode 'client_secret=WExEwa********************ZJIeppks' --data-urlencode 'scope=core::' --data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' --data-urlencode 'client_assertion=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjMzFiMDRiNC1mZGRhLTQwMmQtYjkzOC1mOWI0OWEwMTU4MGQiLCJpYXQiOjE3NDY1OTY4NTksImV4cCI6MTc0NjU5NjkxOSwiaXNzIjoiNzJmMzE4MTQtMmQwMC00YzZmLWE1YTYtMWMxNjhmZmUzMmQzIiwiYXVkIjoiaHR0cHM6Ly9hdXRoLmJyaWdodHNwYWNlLmNvbS9jb3JlL2Nvbm5lY3QvdG9rZW4ifQ.GQQA23Q5GdvuUgP30Fj2bcQ2wZ7YSNrXq7R_LhzfzOQ'

Output Response:
{
"error": "unauthorized_client",
"error_description": "This client is not permitted to use the client_credentials grant"
}

Tagged:

Best Answer

  • Ian.P.710
    Ian.P.710 Posts: 31
    Answer ✓

    D2L Oauth2 does not currently support the client credentials grant type you need to use the Authorization code type.
    In postman use the authorize using browser and in Brightspace set the callback url to match the https://oauth.postmn.io/v1/callback
    or if using the browser version of postman the value that appears in the field when the authorize using browser check box is enabled.

    image.png