Summary
I try to retrieve a permission set from my org.
In the org, the permission set has RetainFieldHistory enabled
When I retrieve it, the permission set metadata file doesn't include it.
CLI command: sf project retrieve start -m PermissionSet:sysadmin
In contrast, the user permission is included, when I retrieve the standard System Administrator profile
sf project retrieve start -m Profile:Admin
Steps To Reproduce
Have an org, where Shield's Field Audit Trail is enabled
Create a custom permission set
Enable the user permission RetainFieldHistory
Retrieve it via the CLI by running sf project retrieve start -m PermissionSet:sysadmin
Tip
use sf doctor --create-issue to automatically fill the required information
Expected result
Expected the permission set to include:
<userPermissions>
<enabled>true</enabled>
<name>RetainFieldHistory</name>
</userPermissions>
Actual result
It didn't include the user permission, despite being set in the org.
Additional information
System Information
Which shell or terminal are you using? PS
{
"architecture" : " win32-x64" ,
"cliVersion" : " @salesforce/cli/2.150.6" ,
"nodeVersion" : " node-v24.19.0" ,
"osVersion" : " Windows_NT 10.0.26200" ,
"rootPath" : " C:\\ Users\\ ext-nto\\ AppData\\ Local\\ sf\\ client\\ 2.150.6-c049970" ,
"shell" : " cmd.exe" ,
"pluginVersions" : [
" @oclif/plugin-autocomplete 3.3.0 (core)" ,
" @oclif/plugin-commands 4.2.0 (core)" ,
" @oclif/plugin-help 6.3.0 (core)" ,
" @oclif/plugin-not-found 3.3.0 (core)" ,
" @oclif/plugin-plugins 5.5.1 (core)" ,
" @oclif/plugin-search 1.3.0 (core)" ,
" @oclif/plugin-update 4.8.0 (core)" ,
" @oclif/plugin-version 2.3.0 (core)" ,
" @oclif/plugin-warn-if-update-available 3.2.0 (core)" ,
" @oclif/plugin-which 3.3.0 (core)" ,
" @salesforce/cli 2.150.6 (core)" ,
" agent 2.0.5 (core)" ,
" apex 4.1.1 (core)" ,
" api 2.0.9 (core)" ,
" auth 5.0.6 (core)" ,
" code-analyzer 5.16.0 (user)" ,
" data 5.1.7 (core)" ,
" deploy-retrieve 4.1.2 (core)" ,
" info 4.0.9 (core)" ,
" limits 4.0.4 (core)" ,
" marketplace 2.0.5 (core)" ,
" org 6.0.11 (core)" ,
" packaging 3.0.6 (core)" ,
" schema 4.0.6 (core)" ,
" settings 3.0.6 (core)" ,
" sobject 2.0.5 (core)" ,
" telemetry 4.0.6 (core)" ,
" templates 57.0.11 (core)" ,
" trust 4.0.10 (core)" ,
" user 5.0.2 (core)" ,
" sfdx-git-delta 6.45.1 (user)"
]
}
Summary
I try to retrieve a permission set from my org.
sf project retrieve start -m PermissionSet:sysadminIn contrast, the user permission is included, when I retrieve the standard System Administrator profile
sf project retrieve start -m Profile:AdminSteps To Reproduce
RetainFieldHistorysf project retrieve start -m PermissionSet:sysadminTip
use
sf doctor --create-issueto automatically fill the required informationExpected result
Expected the permission set to include:
Actual result
It didn't include the user permission, despite being set in the org.
Additional information
System Information
Which shell or terminal are you using? PS
{ "architecture": "win32-x64", "cliVersion": "@salesforce/cli/2.150.6", "nodeVersion": "node-v24.19.0", "osVersion": "Windows_NT 10.0.26200", "rootPath": "C:\\Users\\ext-nto\\AppData\\Local\\sf\\client\\2.150.6-c049970", "shell": "cmd.exe", "pluginVersions": [ "@oclif/plugin-autocomplete 3.3.0 (core)", "@oclif/plugin-commands 4.2.0 (core)", "@oclif/plugin-help 6.3.0 (core)", "@oclif/plugin-not-found 3.3.0 (core)", "@oclif/plugin-plugins 5.5.1 (core)", "@oclif/plugin-search 1.3.0 (core)", "@oclif/plugin-update 4.8.0 (core)", "@oclif/plugin-version 2.3.0 (core)", "@oclif/plugin-warn-if-update-available 3.2.0 (core)", "@oclif/plugin-which 3.3.0 (core)", "@salesforce/cli 2.150.6 (core)", "agent 2.0.5 (core)", "apex 4.1.1 (core)", "api 2.0.9 (core)", "auth 5.0.6 (core)", "code-analyzer 5.16.0 (user)", "data 5.1.7 (core)", "deploy-retrieve 4.1.2 (core)", "info 4.0.9 (core)", "limits 4.0.4 (core)", "marketplace 2.0.5 (core)", "org 6.0.11 (core)", "packaging 3.0.6 (core)", "schema 4.0.6 (core)", "settings 3.0.6 (core)", "sobject 2.0.5 (core)", "telemetry 4.0.6 (core)", "templates 57.0.11 (core)", "trust 4.0.10 (core)", "user 5.0.2 (core)", "sfdx-git-delta 6.45.1 (user)" ] }