Find your content:

Search form

You are here

REST API: 18 Digits ID is not working but 15 Digit does

 
Share

In rest if I, for a standard user, use

"/services/data/v28.0/sobjects/User/"User ID"/Password"

to check whether logged in user password is expired or not (testing in REST explorer Workbench).

When I give 18 digits ID in user id I get an error -Error code- INSUFFICIENT ACCESS MESSAGE- you do not have permission to view the record.

However If I use 15 digits ID I do not get any error, - isExpired=true"

Is someone else also experiencing this weird behavior ?


Attribution to: Sara

Possible Suggestion/Solution #1

This is filed as a known bug:

Summary:

When a user who doesn't have the "Manage Users" permission issues an HTTP request getting current password expiration of his own using REST API Password resource, the request fails with INSUFFICIENT_ACCESS if 18 char id is specified to the URL, while it works with 15 char id.

Reproduction:

  1. login to workbench as a user who doesn't have the "manage users" perm, like a Standard User Profile user.

  2. execute the following URI through REST explorer, and you will get the INSUFFICIENT_ACCESS error.

/services/data/v29.0/sobjects/User/<18 char id of the user>/password

Workaround Specify 15 char ID to the REST API URI


Attribution to: Sara
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/33946

My Block Status

My Block Content