
What permissions do you need to edit metadata?
Users must have the Customize Application permission to create, update, and delete metadata records. Thereafter, users with the Modify Metadata Through Metadata API Functions permission can edit metadata (including Apex) through Metadata API even if they don’t also have the Modify All Data permission. Metadata API is used for deployments using change sets, the Ant Migration Tool, or the Salesforce CLI. Users must have the permission that enables use of the feature supported by the metadata they’re trying to modify. They must also have the permission that enables their deployment tool.
Does Apex use metadata?
Some metadata, such as Apex, executes in system context, so be careful how you delegate the Modify Metadata Through Metadata API Functions permission. Modify Metadata Through Metadata API Functions allows deployment of Apex metadata, but it doesn’t allow some Apex development and debugging features that still require the Modify All Data permission.
