+ Start a Discussion
Equipe VREquipe VR 

Username-Password OAuth Authentication Flow with Partner User

Hi all,

I want to use the Username-Password OAuth Authentication Flow with a partner user license. However, when I try to do this call, i have an error.

As mentioned in the docs (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_username_password_oauth_flow.htm) this flow requires the security token with the password, but the partner user license doesn't have a security token.

This is the response when call the default endpoint:
{
    "error": "invalid_grant",
    "error_description": "authentication failure"
}

This is de response when i use the community URL:
{
    "error": "unsupported_grant_type",
    "error_description": "grant type not supported"
}
My question is if is possible to use this OAuth Flow with partner user (and how can I do this), or if only User-Agent or Web Server are supported for this license type (can't find this in docs).

Thanks!
Best Answer chosen by Equipe VR
Om PrakashOm Prakash
Hi Equipe,
1. Have a look on this article
https://developer.salesforce.com/blogs/developer-relations/2013/02/oauth-for-portal-users.html

OR

2.  Workaroud:
We  will need to authanticate the community users by SOAP api the we will have session token.
We need to use this session token in the header of REST request during your Rest API call.