function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mayuri HiwaleMayuri Hiwale 

Getting below error while creating salesforce user from REST api.

Hi, I have implemented OAuth2.0 flow and get access-token. I am trying to create user on salesforce endpoint with generated access-token and domain. But I m getting below error while creating user.

HTTP/1.1 404 Not Found [Date: Fri, 01 Apr 2016 13:29:32 GMT, Content-Security-Policy-Report-Only: default-src https:; script-src https: 'unsafe-inline' 'unsafe-eval'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /_/ContentDomainCSPNoAuth?type=mydomain, Set-Cookie: BrowserId=qrsv8O_ITjKV-Jf-YuIKoA;Path=/;Domain=.salesforce.com;Expires=Tue, 31-May-2016 13:29:32 GMT, Expires: Thu, 01 Jan 1970 00:00:00 GMT, Sforce-Limit-Info: api-usage=2/15000, Content-Type: application/json;charset=UTF-8, Transfer-Encoding: chunked]
org.apache.http.conn.BasicManagedEntity@191a2138
[Date: Fri, 01 Apr 2016 13:29:32 GMT, Content-Security-Policy-Report-Only: default-src https:; script-src https: 'unsafe-inline' 'unsafe-eval'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /_/ContentDomainCSPNoAuth?type=mydomain, Set-Cookie: BrowserId=qrsv8O_ITjKV-Jf-YuIKoA;Path=/;Domain=.salesforce.com;Expires=Tue, 31-May-2016 13:29:32 GMT, Expires: Thu, 01 Jan 1970 00:00:00 GMT, Sforce-Limit-Info: api-usage=2/15000, Content-Type: application/json;charset=UTF-8, Transfer-Encoding: chunked]
en_IN
org.apache.http.impl.client.ClientParamsStack@4fde3189


If anyone have idea about this, please help.
noobi devnoobi dev
How are you trying to create the user ? Could you paste your usage of the salesforce endpoint for creating this user ?
Mayuri HiwaleMayuri Hiwale
I am trying to create user using REST API in java :
I have implemented OAuth 2.0 flow on salesforce developer account (in Apex) and will get the access-token. Now I have below details.
Access-Token : ****************************************
Domain URL : https://test.my.salesforce.com/services/data/v20.0/user
User JSON : {  
                    "userName":"TestUser11",
                    "name": { "givenName":"TestUser11",
                                   "familyName": "LastName11" },
                    "locale":"en_US",
                    "timezone":"Asia/Kolkata",
                   "preferredLanguage":"en_US",
                   "profileId":"00e30000001q7ujAAA",
                   "emails":[  {
                                 "value":"example@gmail.com" } ]
                    }

Usage to create user : Provision and deprovision user on salesforce endpoint.

Do you think this is permissions issue?