Sub topic 11
Monitoring and governing installed apps over time
Installing an app is a one-time event. Owning it is not. A package that passed your review last spring can ship a new version, request new access, lose its publisher's support, or sit unused while still holding licenses and permissions. This chapter covers how to keep installed AppExchange apps under control after go-live.
This chapter assumes you can navigate Setup, read permission sets and profiles, and run SOQL queries. It also assumes you have already installed at least one package, in a sandbox or in production. If you have not, read the earlier chapters on sandbox trials and install options first.
Why governance continues after install
Three things change after you install an app:
- The app changes. The publisher releases versions. Managed package upgrades can add components, change behavior, and ask for new permissions.
- Your org changes. You add fields, flows, integrations, and users. An app that was harmless in a small org can interact badly with new automation.
- The people change. The admin who approved the app leaves. Nobody remembers why the app exists or who owns it.
Governance means answering four questions on a schedule: what is installed, who can use it, what is it doing, and should it stay.
Build and maintain an inventory
You cannot govern what you have not listed. In Setup, open Installed Packages. For each package, record the name, publisher, namespace prefix, version, install date, business owner, and the reason the app was approved.
The first three come from Salesforce. The last three come from you. Keep them in a shared register, such as a spreadsheet, a wiki page, or a custom object, and name a business owner for every app. An app with no owner is the first candidate for review.
You can pull the technical part of the inventory with the Salesforce CLI:
sf package installed list --target-org my-prod --jsonThe --json output is easy to save with a date in the file name and compare over time. A new row or a changed version between two snapshots tells you something happened.
If you prefer SOQL, you can query the Tooling API:
sf data query --use-tooling-api --target-org my-prod \
--query "SELECT SubscriberPackage.Name, SubscriberPackage.NamespacePrefix, SubscriberPackageVersion.Name FROM InstalledSubscriberPackage"Run either command on a schedule, or before every review meeting.
Review who has access
Permissions drift. People change roles, and temporary access becomes permanent. Review the app's permission sets on a regular schedule.
To see who currently holds permission sets that belong to a package, query assignments by namespace. Replace examplens with the package's namespace prefix:
sf data query --target-org my-prod \
--query "SELECT Assignee.Username, PermissionSet.Name, PermissionSet.Label FROM PermissionSetAssignment WHERE PermissionSet.NamespacePrefix = 'examplens'"Compare the result with your expected user list. Look for:
- Users who left the team or the company but are still active.
- Administrators holding the app's most powerful permission set for convenience.
- Profiles that still carry app permissions from an install that used "specific profiles" or "all users".
If you installed with broad access in the past, convert it. Create or reuse a permission set, assign it to the people who need it, then remove the app permissions from the profiles. Do this in a sandbox first, because removing access from a profile can break page layouts, flows, or integrations that depended on it.
Watch for access added by upgrades
A new package version can add objects, fields, and permission set contents. Permission sets that belong to a managed package are updated by the publisher when you upgrade. Users who already hold the set get the new permissions without you assigning anything.
After each upgrade, open the app's permission sets and compare them with the previous version's release notes. Pay attention to new object permissions, new system permissions such as "View All Data" or "Modify All Data", and new Apex class or custom permission access.
Check activity and external connections
An installed app often reaches outside your org. Review these places regularly:
| Where to look | What it shows | What to watch for |
|---|---|---|
| Setup > Remote Site Settings | URLs Apex callouts can reach | New or unexplained endpoints |
| Setup > Named Credentials and External Credentials | Stored authentication to external systems | Credentials whose owner is unknown |
| Setup > Connected Apps OAuth Usage | Which connected apps have tokens, and how many users | Many users, old last-use dates |
| Setup > Manage Connected Apps | OAuth scopes and policies for connected apps | Broad scopes such as `full` |
| Setup > Login History | Logins, including integration users | Unexpected IPs or login types |
| Setup > View Setup Audit Trail | Configuration changes for about 180 days | Changes to permissions or integration settings |
| Apex Jobs and Scheduled Jobs | Batch and scheduled work the app runs | Failed or long-running jobs |
Setup Audit Trail is useful after upgrades. It shows who changed settings and when, so you can tell your own admins' changes apart from changes made as part of a package install.
Event Monitoring
If your org has Salesforce Shield or the Event Monitoring add-on, you get event log files and real-time events. These can show API calls, report exports, logins, and Apex executions. You can filter them by user to see what an integration user for an app does.
Without Event Monitoring, rely on Login History, Setup Audit Trail, debug logs for specific users, and the app's own logs. Be honest about the gap: if you cannot see what an app does with data, treat that as a risk and limit its access further.
Unusual signs
Investigate when you see:
- A spike in API requests from the app's integration user.
- Callouts to a domain that is not in the app's documentation.
- A connected app with a recent token for a user who does not use the app.
- Scheduled jobs the publisher did not mention.
First contact the publisher with specifics. If the answer is not good enough, restrict access while you investigate. Removing the permission set from the integration user is quick and reversible.
Track licenses
Many AppExchange apps use package licenses. You may be paying for seats nobody uses, or you may be near the limit when a new team starts. Check usage in Setup under Installed Packages, then Manage Licenses for the package. You can also query the data:
sf data query --target-org my-prod \
--query "SELECT NamespacePrefix, Status, AllowedLicenses, UsedLicenses, ExpirationDate FROM PackageLicense"Read the columns this way:
AllowedLicensesis the number you bought. A value of-1means the package has unlimited licenses.UsedLicensesis the number currently assigned.ExpirationDateandStatustell you whether the license is active, expired, or suspended.
Use these to take action. Remove licenses from users who have not logged in for a defined period, such as 90 days. Put the license expiration date in your calendar at least 90 days before it arrives, because renewal often involves procurement and a security re-review. Note that some apps are free or not license-based, and for those, access control through permission sets is the only lever.
Manage upgrades deliberately
Upgrade handling depends on the package type, as covered earlier in this tutorial.
- Managed packages can be upgraded in place, and the publisher controls the code. Upgrades keep your data and your configuration of the app's components within the package's rules.
- Unmanaged packages have no upgrade path. Updating means installing again, which can overwrite components you changed, or clutter the org with duplicates. Track the changes you made yourself.
Whichever applies, use a fixed routine for each new version:
- Read the release notes. Look for new permissions, new external connections, deprecated features, and required configuration.
- Install the new version in a sandbox that mirrors production.
- Rerun the scenarios you used in the original trial, including integrations and automation.
- Compare the permission sets and external endpoints with the previous version.
- Schedule the production upgrade for a low-traffic window, and tell users.
- Verify afterward, using the same checks as after a first install.
Treat a major version, a publisher change, or a new set of permissions as a new vetting. Go back to the listing, check the publisher's reviews and support, and ask whether the Security Review status is current for the new version. A review applies to a specific version, so a version you have not checked has not necessarily been through it.
Also read publisher notices about end of life. If the publisher stops supporting the app, decide early whether to find a replacement. Unsupported code in your org is risk that grows every release.
Decide: keep, restrict, or remove
At each review, make one of three decisions for every app and record it in your register.
- Keep when the app has an active owner, measurable use, a supported version, and access that matches its purpose.
- Restrict when usage is narrower than access. Remove permission set assignments, reduce integration scopes, or shorten the list of profiles.
- Remove when nobody uses it, the publisher no longer supports it, a duplicate app exists, or the risk outweighs the value.
Removal follows the sandbox rehearsal from earlier chapters. Check dependencies first, export data you need to keep, then uninstall and update your register.
A simple governance calendar
You do not need a heavy process. A light, regular schedule works better than a thorough one that nobody follows.
| Frequency | Task |
|---|---|
| Monthly | Review Setup Audit Trail and Login History for integration users. Read publisher release notices. |
| Quarterly | Recheck permission set assignments, license usage, and connected app tokens for every app. |
| At each upgrade | Sandbox test, compare permissions and endpoints, verify afterward. |
| Yearly | Reconfirm each app's business owner, purpose, and renewal. Remove what is unused. |
Add a check to your new-user and offboarding processes too. Permission set assignments and package license assignments should follow the same joiner, mover, and leaver steps as other access.
Common mistakes
- Treating the install review as permanent. The review covers one version at one moment.
- Leaving trial access in place. Broad access used for testing often stays after launch.
- Ignoring integration users. They are real users with real permissions, and nobody logs in as them to notice problems.
- Not recording ownership. When the owner leaves, nobody can answer whether the app is still needed.
- Upgrading production first. The sandbox is cheap. A broken production automation is not.
Exercise
Your quarterly review finds that an installed managed package has 40 assigned licenses but only 12 users logged in during the last 90 days. The publisher also released a new version that adds an external callout endpoint. List the actions you take, in order.
Show answer
First, record the findings in the register. Then reduce licenses by removing assignments from users who have not used the app for 90 days, after confirming with their managers. Next, do not upgrade production yet. Install the new version in a sandbox, read the release notes, and compare permission sets and Remote Site Settings or Named Credentials against the current version. Ask the publisher what the new endpoint is for and what data goes to it. If the answer is acceptable, rerun the trial scenarios, then upgrade production in a quiet window and verify afterward. If not, stay on the current version, restrict access, and consider replacement.
Exercise
Which query would you run to list the users who hold permission sets from a package with the namespace prefix examplens, and what would you compare the result against?
Show answer
Query PermissionSetAssignment, filtering on PermissionSet.NamespacePrefix = 'examplens', and select Assignee.Username and PermissionSet.Name. Compare the result against the list of approved users and roles in your app register, and look for departed users, administrators with unnecessary access, and users who no longer need the app.