Discussions
SSO Workflow Issue - "invalid_grant" Error
3 months ago by Bruno Rosa
Hi everyone,
I’m encountering an invalid_grant error when requesting an access_token via /token. Here’s the workflow and failure point:
Token Request
POST: https://mymaindomain/token
Body (x-www-form-urlencoded):
grant_type: refresh_token
client_id: <my_client_id>
client_secret: <my_secret>
refresh_token: <refresh_token> *// From Client App redirect URL*
Response:
{ "error": "invalid_grant" }
SSO Flow Breakdown
- Client (A): Sends refresh code →
https://another_domain/sso(B) - Service (B): Redirects to →
https://myinstance.imiscloud.com/Root_Folder/Folder_X/Page-Testing-SSO.aspx?code=<refresh_code_here>(C) - Page (C): Extracts code → Requests token from
https://another_domain/page-sso?code=<refresh_code_here>(D)
Failure: Step (D) returns invalid_grant, blocking IQA lookup.
Troubleshooting Attempted
- Verified server timezone sync (no impact).
