forcedotcom / cli

Salesforce CLI
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/
BSD 3-Clause "New" or "Revised" License
494 stars 78 forks source link

ManagePackageLicenses permission cannot be retrieved #2578

Open jfaderanga opened 1 year ago

jfaderanga commented 1 year ago

Summary

Retrieving permission set does not include ManagePackageLicenses permission.

Steps To Reproduce

Expected result

Actual result

System Information

MAC OS zsh

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.17.14",
  "nodeVersion": "node-v20.9.0",
  "osVersion": "Darwin 23.1.0",
  "rootPath": "/Users/jaysonf/.local/share/sf/client/2.17.14-31db5eb",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.1 (core)",
    "@oclif/plugin-commands 3.0.6 (core)",
    "@oclif/plugin-help 6.0.5 (core)",
    "@oclif/plugin-not-found 3.0.3 (core)",
    "@oclif/plugin-plugins 4.1.7 (core)",
    "@oclif/plugin-search 1.0.6 (core)",
    "@oclif/plugin-update 4.1.3 (core)",
    "@oclif/plugin-version 2.0.6 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.2 (core)",
    "@oclif/plugin-which 3.0.8 (core)",
    "@salesforce/cli 2.17.14 (core)",
    "apex 2.3.20 (core)",
    "auth 2.8.26 (core)",
    "data 2.6.3 (core)",
    "deploy-retrieve 1.20.0 (core)",
    "info 3.0.1 (core)",
    "limits 3.0.1 (core)",
    "login 2.0.1 (core)",
    "marketplace 1.0.2 (core)",
    "org 2.11.8 (core)",
    "packaging 1.27.1 (user)",
    "schema 3.0.1 (core)",
    "settings 2.0.2 (core)",
    "sobject 0.2.15 (core)",
    "source 2.11.0 (core)",
    "telemetry 3.1.0 (core)",
    "templates 55.5.18 (core)",
    "trust 3.0.2 (core)",
    "user 2.3.42 (core)",
    "sfdx-git-delta 5.30.0 (user)",
    "sfpowerkit 6.1.0 (user)"
  ]
}

Additional Information

github-actions[bot] commented 1 year ago

Hello @jfaderanga :wave: It looks like you didn't include the full Salesforce CLI version information in your issue. Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).

A few more things to check:

Thank you!

github-actions[bot] commented 1 year ago

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

github-actions[bot] commented 1 year ago

Hello @jfaderanga :wave: None of the versions of sf you shared match the latest release.

Shared: 2.6.9, 2.6.9 Latest: 2.17.14

Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue. You can also try the rc and nightly releases! (docs)

After updating, share the full output of sf version --verbose --json

mshanemc commented 1 year ago

@jfaderanga I don't see that in the metdata API type for PermissionSet. https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_permissionset.htm

What version of the metadata API supports ManagePackageLicenses?

jfaderanga commented 1 year ago

@mshanemc yeah I don't see it in the documentation as well. It works fine on API V59.0 if you manually added it.

<userPermissions>
    <enabled>true</enabled>
    <name>ManagePackageLicenses</name>
</userPermissions>
mshanemc commented 1 year ago

ok, if it deploys than we'll assume it's OK in the API and the docs are hopefully just behind.

Does the command show that it's retrieving v59 metadata (on a v59 connection?). If not, that could be a setting in your sfdx-project.json.

If so, can you you try to do this with some other mdapi tool (for example, workbench)? I'd like to know if the API is not returning properly. You could also try use the mdapi-flavored version of the command --target-metadata-dir and see if that brings it down.

I can tell you that the CLI isn't doing anything "inside" the xml contents on PermissionSet, so if the API is really omitting those, you'll have to open a case to get it fixed.

jfaderanga commented 1 year ago

yes, I tried multiple API version from 55.0 and it's the same output. I also tried the --target-metadata-dir on sf project retrieve start and same, it's not pulling it down..

mshanemc commented 1 year ago

Alrighty. I'll turn this into a bug and assign it to the right team, but cases help with prioritization.

git2gus[bot] commented 1 year ago

This issue has been linked to a new work item: W-14560382

github-actions[bot] commented 1 year ago

We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.