Trying to automate some package installs via Apex using the Metadata API.
When you install a package via the UI you get asked who to install for (Defaults to Admins Only):
Is there any way to specify "All Users" when performing via the Metadata API? I couldn't seem to find mention of it in the documentation..
Current XML being used to install a package (portions redacted)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header>
<urn:SessionHeader xmlns:urn="http://soap.sforce.com/2006/04/metadata">
<urn:sessionId>{sessionId}</urn:sessionId>
</urn:SessionHeader>
</env:Header>
<env:Body>
<createMetadata xmlns="http://soap.sforce.com/2006/04/metadata">
<metadata xsi:type="InstalledPackage">
<versionNumber>2.4</versionNumber>
<fullName>{Namespace}</fullName>
</metadata>
</createMetadata>
</env:Body>
</env:Envelope>
Seems a big oversight to have not included the ability to set this as setting to Admins only by default causes issues....at least for me
password
andversionNumber
on InstalledPackage then there aren't many more options. Maybe it's an extra post install step SF are performing.