4

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 ?

4
  • Is this in an org which is now on Spring '14? When making requests to my dev org (API v30) using an 18 or 15 character Id with the "proper" case for a 15 character Id returns values, however the same 18 character Id in lower-case returns a "Malformed Id" response. This behavior is the same for all of the sObject types I tested.
    – Mark Pond
    Commented Apr 29, 2014 at 22:03
  • @MarkPond this is spring 14.
    – Sara
    Commented May 5, 2014 at 1:39
  • It appears that the REST API only accepts the case-sensitive 15 character ID as a valid value. If an 18 character value is provided and it has the proper casing, the extra 3 characters are simply ignored.
    – Mark Pond
    Commented May 5, 2014 at 5:03
  • But with system admin profile 18 digits id does work.
    – Sara
    Commented May 5, 2014 at 7:26

1 Answer 1

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

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .