Clone packaged permission set in Apex

As part of another question where I tried to automate the creation of a Connected App for a Managed App and were successful with many steps but failed

  • Assign a packaged permission set to the Connected App
  • Set the Connected App’s Oauth to Is Admin Auto-Approved

It worked in a Developer org but not in a production org setting.

I know that I am able to manually clone the Packaged Permission Set and do those 2 steps manually but maybe there is also a way to do this cloning from Apex.

Is it possible (and how) to create a Permission Set copy for a managed package Permission Set? This should also work in subscriber Production Orgs.

Answer

Attribution
Source : Link , Question Author : Robert Sösemann , Answer Author : Community

Leave a Comment