Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ManagePackageLicenses permission cannot be retrieved #2578

Open
jfaderanga opened this issue Nov 23, 2023 · 10 comments
Open

ManagePackageLicenses permission cannot be retrieved #2578

jfaderanga opened this issue Nov 23, 2023 · 10 comments
Labels
bug Issue or pull request that identifies or fixes a bug owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. validated Version information for this issue has been validated

Comments

@jfaderanga
Copy link

jfaderanga commented Nov 23, 2023

Summary

Retrieving permission set does not include ManagePackageLicenses permission.

Steps To Reproduce

  • Create a permission set with license of Salesforce or Salesforce API Integration
  • Assign the Manage Package Licenses Permission under System Permissions settings.
  • Click save and retrieve via SF or SFDX CLI

Expected result

  • The permission set that was retrieved should have the ManagePackageLicenses permission in the XML

Actual result

  • The permission set that was retrieved does not have the ManagePackageLicenses permission in the XML

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

  • Same issue for sandbox and production environment.
  • The xml file is deployable and updates the permission properly when you manually add the ManagePackageLicenses in the xml.
<userPermissions>
    <enabled>true</enabled>
    <name>ManagePackageLicenses</name>
</userPermissions>
  • CLI Version: @salesforce/cli/2.6.9 darwin-arm64 node-v18.15.0
@jfaderanga jfaderanga added the investigating We're actively investigating this issue label Nov 23, 2023
Copy link

Hello @jfaderanga 👋 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:

  • Make sure you've provided detailed steps to reproduce your issue.
    • A repository that clearly demonstrates the bug is ideal.
  • Make sure you've installed the latest version of Salesforce CLI. (docs)
    • Better yet, try the rc or nightly versions. (docs)
  • Try running the doctor command to diagnose common issues.
  • Search GitHub for existing related issues.

Thank you!

@github-actions github-actions bot added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Nov 23, 2023
Copy link

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.

Copy link

Hello @jfaderanga 👋 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

@github-actions github-actions bot added validated Version information for this issue has been validated investigating We're actively investigating this issue and removed more information required Issue requires more information or a response from the customer labels Nov 24, 2023
@mshanemc
Copy link
Contributor

@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?

@mshanemc mshanemc added the more information required Issue requires more information or a response from the customer label Nov 26, 2023
@jfaderanga
Copy link
Author

jfaderanga commented Nov 26, 2023

@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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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

@mshanemc mshanemc added bug Issue or pull request that identifies or fixes a bug owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. and removed more information required Issue requires more information or a response from the customer labels Nov 27, 2023
Copy link

git2gus bot commented Nov 27, 2023

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

Copy link

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.

@mshanemc mshanemc removed the investigating We're actively investigating this issue label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

2 participants