I am making POST request to https://login.salesforce.com/services/oauth2/token to get the access token. Which is resulting in a 400 response code with the message - {"error":"invalid_grant","error_description":"inactive organization"}

What can be the meaning of this error?


Server Sends a Response

After the request is verified, Salesforce sends a response to the client. Token responses for the OAuth 2.0 SAML bearer token flow follow the same format as authorization_code flows, although no refresh_token is ever issued.

Note: A SAML OAuth 2.0 bearer assertion request looks at all the previous approvals for the user that include a refresh_token. If matching approvals are found, the values of the approved scopes are combined and an access_token is issued (with "token_type" value "Bearer"). If no previous approvals included a refresh_token, no approved scopes are available, and the request fails as unauthorized.


If there is an error in processing the SAML bearer assertion, the server replies with a standard OAuth error response, including an error and an error description containing additional information regarding the reasons the token was considered invalid. Here is a sample error response:

HTTP/1.1 400 Bad Request
Content-Type: application/json
Cache-Control: no-store
"error_description":"Audience validation failed"

Refer this for Detail Answers and Search for "Using SAML Bearer Assertions" this heading in pdf

  • @Smita : If this answer has solved your issue - Or You got in above answer - what you were looking for then please accept above answer as solution. It will help others too. Jan 8 '16 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.