7

We receive "Cannot grant or remove a profile with modify all data, without having the modify all data permission yourself." exception message when it shouldn't appear.

When there are two users, User Test 1 and User Test 2. User Test 2 has a permission set assigned with "Modify All Data" permission (but doesn't have that permission at profile level). User Test 1 doesn't have "Modify All Data" permission either in profile or in permission sets. When User Test 1 tries to perform dummy update of User Test 2 (no fields are changed or modified), an error is thrown "Cannot grant or remove a profile with modify all data, without having the modify all data permission yourself." even though no change in profile happens.

I am not sure if I should open Salesforce support ticket or is there any way to workaround this bug? I don't want to give "Modify All Data" permission to User Test 1.

=========

Dummy update is like update new User(Id=UserInfo.getUserId()), so no fields are changed

I would also provide a screen capturing video to explain that I do not use any code but rather I just update user from UI enter image description here

7
  • 1
    Personally I'd recommending going ahead and logging a case. But given the poor response time of salesforce support, I'd continue searching for a work around you can implement. Commented Jun 4, 2018 at 16:02
  • 1
    I don't understand the "Dummy update" part, Can you please elaborate?
    – Mr.Frodo
    Commented Jun 4, 2018 at 16:03
  • yes, dummy update is like update new User(Id=UserInfo.getUserId()), so no fields are changed
    – Patlatus
    Commented Jun 5, 2018 at 9:08
  • I added a screen capturing video to explain better
    – Patlatus
    Commented Jun 7, 2018 at 15:31
  • 2
    @RalphCallaway, yes, I have logged a case on Monday, firstly Salesforce Support replied to me that this is by design, but after I talked to the manager of that Salesforce Support lady and explained that even though a user doesn't have modify all data permission, still this user can update another user who has modify all data permission in profile but not assigned by a permission set, and after that they started investigation but didn't reply anything yet to me. They keep saying that they don't have any updates from Tier 3
    – Patlatus
    Commented Jun 9, 2018 at 10:14

2 Answers 2

2

We have opened a case in Salesforce Support. Initially they said that this is expected behavior but later in a month time they have found a known issue with Reference W-2922695 they have discovered themselves in February.

Meanwhile we have found another workaround for our particular problem. We used automated process to update users from a user who doesn't have Modify All permission. We ended up writing a custom Apex Rest Service class to run in System context (without sharing) and we call that Apex Rest service class from a user who doesn't have Modify All permission in the automated process and it works for us for now. I think that if this was added to known issue list of workarounds then this might help another Salesforce customers who face the same issue.

-1

If you are making this from apex code you can try to make the update of the User record in system mode, that is, by declaring the corresponding apex class as without sharing.

Let me know if this solves your issue.

3
  • I did this from UI, the user who updates the record, doesn't have Author Apex permission
    – Patlatus
    Commented Jun 5, 2018 at 9:41
  • @Patlatus Is it really necessary for you to make this update? I don't see the reason why you want to do it. Commented Jun 5, 2018 at 9:48
  • Yes, it is necessary. we have automated process which performs automatical update even if no fields is changed, and this platform bug is blocker for our functionality
    – Patlatus
    Commented Jun 5, 2018 at 10:04

You must log in to answer this question.

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