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
aravind swaminathanaravind swaminathan 

Cannot grant or remove a profile with modify all data

When i try to do upsert with all the information including profileId, i get "Cannot grant or remove a profile with modify all data,<br>without having the modify all data permission yourself.: Profile ID" error.Without Profile Id, am able to update properly.What is the reason for it?
For Manager/ManagerId field, what is the encoding thats used? i tried decoding using base64 and it didnt work.
Daniel BallingerDaniel Ballinger
For the "Cannot grant or remove a profile with modify all data,"... message, check the profile of the user you are using to make the API calls. If it doesn't have the "Modify All Data" permission then they can't assign a profile with "Modify All Data" enabled to another user. To do so would allow them to grant another user profile with a greater level of access to data than they currently have. You could essentially get to data you can't currently access by modifying user ProfileIds.

The User.ManagerId field will be a Salesforce ID field. This will be an 18 character identifier. See User (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_user.htm). How are you accessing the data in the API? There may be a child sObject in the Partner API with the Manager User data.