If you'd like to permit the location of Reports and Dashboards saved in a user's "My Personal Folder" within your SOQL query (via API version 36 or higher), follow these instructions.
If the following features are not enabled, you'll receive an error titled "INVALID_QUERY_SCOPE" when attempting to locate reports or dashboards in private folders.
Admins can use the allPrivate SOQL scope (available via API version 36 and above) to locate reports and dashboards stored in any user's private folder. This is useful when deactivating users or auditing report storage.
To query Dynamic Dashboards that are stored within Private Folders:
SELECT Id FROM Dashboard USING SCOPE allPrivate WHERE Type != 'SpecifiedUser'
To return the owner name or determine if a user is inactive:
1. Select "Allows SOQL Parent Relationship Queries"
2. Run the following query:
SELECT Id, Owner.Name FROM Report USING SCOPE allPrivate WHERE Owner.IsActive = false
Note: When using Workbench, make sure to select Include for the "Deleted and archived records" to show Reports/Dashboards in the Recycle Bin.
- This functionality is available only for use on the Dashboards and Reports objects. It is not currently supported for use with queries against the DashboardComponent object.
- The Developer Console does not support the "allPrivate" scope, but it can be used in Workbench or Data Loader.
See Also:
Delete a Dashboard
Find old or inactive Reports and Dashboards to delete
Error: "Report cannot be deleted" for report linked to dashboard component
000383270

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.