Skip to main content
Connector guides

Connect Microsoft SharePoint Admin

Microsoft SharePoint Admin connects an AI assistant to the SharePoint and OneDrive tenant settings: sites, sharing, storage and the oversharing controls, in your own directory or in a customer's.

Written By Christopher Scaminaci

Last updated About 3 hours ago

Microsoft SharePoint Admin connects an AI assistant to the SharePoint and OneDrive tenant settings: sites, sharing, storage and the oversharing controls, in your own directory or in a customer's.

With it your AI can:

  • Read tenant settings, sites, sharing links and storage
  • Administer (Pro plans) - change sharing settings, site properties and the oversharing controls

Set it up

  1. Open Connectors, then Set up Microsoft.
  2. Tick Microsoft SharePoint Admin and any other Microsoft connector you want. One app serves all of them.
  3. Pick StackJack's app, or one app of your own. The wizard creates it for you, or fixes one you bring.
  4. Sign in on each connector, then consent your customers in one run.
  5. Read the checklist. Open the wizard again at any time and it checks again.

Steps and the reasons behind them are on Set up Microsoft. If you prefer a shell, the provisioning script does the app registration without the wizard.

Roles you need

  • SharePoint Administrator in each customer
  • Application Administrator or Cloud Application Administrator in each customer, so StackJack can consent your app there

These are Microsoft's documented minimums.

When something goes wrong

What you seeWhat to do
A customer needs two consentsSharePoint needs Microsoft Graph and SharePoint. On your own app, the wizard's run asks for both. On StackJack's app, the SharePoint card and the wizard make two links, SharePoint and its Microsoft Graph permissions: send both.
A customer is listed as "no SharePoint (skipped)"Nothing is wrong. The customer has no SharePoint Online.
A 403 when you preview Authorize all customersThat card's own app cannot read its own registration. Open the grant link in the message once, then preview again.
Microsoft stops the consent with AADSTS650052The directory does not have a service the link asks for. The page that opens after the sign-in says Consent was not granted and shows this code, and Microsoft's message names the service by its application ID. Each link from StackJack asks only for its own connector's permissions, so the service is usually that connector's own, and the directory cannot use that connector (for example, a directory with no Defender). The Purview content search link is the one exception: it asks for every permission on the app, so the directory needs every service the app lists. If the ID is 4990cffe-04e8-4e8b-808a-1175604b879f, it is the Microsoft Partner permission (user_impersonation) on the app. With StackJack's app or your own app, make a fresh consent link in StackJack and send that link. Only the Purview content search link on your own app still needs the removal: remove Microsoft Partner from the API permissions of your app registration in Microsoft Entra, or download the current provisioning script again and run it with -AppId set to your app's application (client) ID. A re-run adds a new client secret, replaces the permission list with the tier you pass (Full if you pass none), and replaces the display name with -DisplayName, so pass the app's current name. Do not remove Microsoft Partner Center; it is a different permission. To consent your own customers without a link, use Authorize all customers on the card. If the message names another service, contact support.

See the generated Microsoft SharePoint Admin tool reference for the current inventory, plan assignment, input schemas and destructive-action labels.

Microsoft SharePoint Admin tools

spo_ · 56 tools · Free 25 · Pro 31

Tenant Settings

ToolWhat it does
spo_get_root_site
Free · Read-only
Get the tenant's root SharePoint site from Microsoft Graph: its web URL and the siteCollection.hostname the connector derives the admin host from ({name}.sharepoint.com becomes {name}-admin.sharepoint.com).
spo_get_sharepoint_settings
Free · Read-only
Get the tenant-wide SharePoint and OneDrive settings from Microsoft Graph: external sharing capability and domain restrictions, site creation, storage limits, sync client restrictions, the idle session sign-out, Loop and more.
spo_get_tenant_properties
Free · Read-only
Get every property of the SharePoint tenant object, the same settings Get-SPOTenant returns: sharing, link types and expiry, OneDrive limits, sync restrictions, conditional access, notifications and many more than Microsoft Graph exposes.
spo_set_tenant_access_and_sync_settings
Pro · Destructive
Change the tenant's access control and sync settings (Set-SPOTenant): the conditional access policy for unmanaged devices, IP address restriction, download blocks, legacy authentication and the sync client restrictions.
spo_set_tenant_onedrive_settings
Pro · Destructive
Change the tenant's OneDrive settings (Set-SPOTenant): the default storage quota, how long a departed user's OneDrive is kept, sharing inside OneDrive and notifications.
spo_set_tenant_sharing_settings
Pro · Destructive
Change the tenant's external sharing and link settings (Set-SPOTenant).
spo_update_sharepoint_settings
Pro · Destructive
Change tenant-wide SharePoint and OneDrive settings through Microsoft Graph.

Site Collections

ToolWhat it does
spo_get_site_by_id
Free · Read-only
Get a site collection's tenant admin record by its site id (a GUID) from the SPO.Tenant sites API.
spo_get_site_collection
Free · Read-only
Get the admin properties of one site collection by URL (Get-SPOSite): owner, template, storage used and limits, lock state, sharing capability, hub site, group and Teams connection.
spo_list_site_administrators
Free · Read-only
List a site collection's administrators (the owners with site collection admin rights) by site id.
spo_list_site_collections
Free · Read-only
List the tenant's site collections with their admin properties: URL, title, owner, template, storage used and limit, lock state, sharing capability and hub association.
spo_set_site_admin
Pro · Destructive
Add or remove one person as a site collection administrator (Set-SPOUser -IsSiteCollectionAdmin).
spo_set_site_lock_state
Pro · Destructive
Lock or unlock a site collection (Set-SPOSite -LockState).
spo_set_site_properties
Pro · Destructive
Change other admin properties of a site collection (Set-SPOSite): its title, classification and a few switches.
spo_set_site_secondary_administrators
Pro · Destructive
REPLACE a site collection's secondary administrator list.
spo_set_site_sharing_capability
Pro · Destructive
Set how a site collection may be shared externally (Set-SPOSite -SharingCapability).
spo_set_site_storage_quota
Pro · Destructive
Set a site collection's storage limit and warning level in MB (Set-SPOSite -StorageQuota).

Site Lifecycle

ToolWhat it does
spo_archive_site
Pro · Destructive
Archive a site collection (Microsoft 365 Archive).
spo_get_deleted_site
Free · Read-only
Get one deleted site collection from the tenant recycle bin by URL (Get-SPODeletedSite -Identity).
spo_list_deleted_sites
Free · Read-only
List the site collections in the tenant recycle bin (Get-SPODeletedSite) with the days remaining before they are removed for good.
spo_remove_deleted_site
Pro · Destructive
Permanently delete a site collection that is already in the tenant recycle bin (Remove-SPODeletedSite).
spo_remove_site
Pro · Destructive
Move a site collection to the tenant recycle bin (Remove-SPOSite).
spo_restore_deleted_site
Pro · Destructive
Restore a site collection from the tenant recycle bin (Restore-SPODeletedSite).
spo_unarchive_site
Pro · Destructive
Reactivate an archived site collection (Microsoft 365 Archive).

Hub Sites

ToolWhat it does
spo_connect_site_to_hub
Pro · Destructive
Associate a site collection with a hub site (Add-SPOHubSiteAssociation).
spo_disconnect_site_from_hub
Pro · Destructive
Remove a site collection's hub association (Remove-SPOHubSiteAssociation).
spo_get_hub_site
Free · Read-only
Get a hub site's properties by its hub site id (Get-SPOHubSite): title, URL, logo and the site collection that serves as the hub.
spo_grant_hub_site_rights
Pro · Destructive
Let people or groups associate sites with a hub (Grant-SPOHubSiteRights -Rights Join).
spo_revoke_hub_site_rights
Pro · Destructive
Take back the right to associate sites with a hub (Revoke-SPOHubSiteRights).

External Users and Home Sites

ToolWhat it does
spo_list_external_users
Free · Read-only
List the tenant's external (guest) users (Get-SPOExternalUser): who they are, who invited them and when.
spo_list_home_sites
Free · Read-only
List the tenant's SharePoint home sites (Get-SPOHomeSite): the landing sites staff reach from the SharePoint start page, with their audience targeting.
spo_list_site_external_users
Free · Read-only
List the external (guest) users who have access to one site collection (Get-SPOExternalUser -SiteUrl).
spo_remove_home_site
Pro · Destructive
Remove a site from the tenant's home sites (Remove-SPOHomeSite).

Advanced Management

ToolWhat it does
spo_add_restricted_search_allowed_sites
Pro · Destructive
Add sites to the Restricted SharePoint Search allowed list (Add-SPOTenantRestrictedSearchAllowedList).
spo_download_restricted_content_discovery_report
Free · Read-only
Download the content of one restricted content discovery report: a CSV file that lists the sites with their title, owner email, dates and URL (Get-SPORestrictedContentDiscoverabilityReport -ReportId).
spo_export_data_access_governance_report
Free · Read-only
Export a finished Data Access Governance report (Export-SPODataAccessGovernanceInsight): the report's CSV file (a ZIP for the PermissionsReport kind).
spo_get_data_access_governance_report
Free · Read-only
Get one Data Access Governance report by its id (Get-SPODataAccessGovernanceInsight -ReportID): its status, type, workload, dates and the settings it was started with.
spo_get_restricted_search_mode
Free · Read-only
Read the tenant's Restricted SharePoint Search mode (Get-SPOTenantRestrictedSearchMode): Disabled (0) or Enabled (1).
spo_get_site_restricted_access_control
Free · Read-only
Read a site collection's restricted access control: whether the policy is on and the IDs of the groups whose members may reach the site (RestrictedAccessControl and RestrictedAccessControlGroups of Get-SPOSite).
spo_get_site_restricted_content_discovery
Free · Read-only
Read whether restricted content discovery is on for one site collection (the RestrictContentOrgWideSearch property of Get-SPOSite).
spo_get_tenant_restricted_access_control
Free · Read-only
Read the tenant-level restricted access control settings (Get-SPOTenant): whether the feature is on, whether sharing outside the allowed groups is permitted, whether site owners may manage the policy, and the two error help links.
spo_list_data_access_governance_reports
Free · Read-only
List the Data Access Governance reports of one kind (Get-SPODataAccessGovernanceInsight -ReportEntity).
spo_list_restricted_content_discovery_reports
Free · Read-only
List the restricted content discovery reports (Get-SPORestrictedContentDiscoverabilityReport): id, status and dates.
spo_list_restricted_search_allowed_sites
Free · Read-only
List the sites on the Restricted SharePoint Search allowed list (Get-SPOTenantRestrictedSearchAllowedList).
spo_list_site_access_reviews
Free · Read-only
Track the site access reviews started from Data Access Governance reports (Get-SPOSiteReview).
spo_remove_data_access_governance_report
Pro · Destructive
Delete a Data Access Governance report (Remove-SPODataAccessGovernanceInsight).
spo_remove_restricted_search_allowed_sites
Pro · Destructive
Remove sites from the Restricted SharePoint Search allowed list (Remove-SPOTenantRestrictedSearchAllowedList).
spo_set_restricted_search_mode
Pro · Destructive
Turn Restricted SharePoint Search on or off for the tenant (Set-SPOTenantRestrictedSearchMode).
spo_set_site_restricted_access_control
Pro · Destructive
Restrict a site collection to the members of named groups, or lift the restriction (Set-SPOSite -RestrictedAccessControl, -RestrictedAccessControlGroups, -AddRestrictedAccessControlGroups, -RemoveRestrictedAccessControlGroups, -ClearRestrictedAccessControl).
spo_set_site_restricted_content_discovery
Pro · Destructive
Turn restricted content discovery on or off for one site collection (Set-SPOSite -RestrictContentOrgWideSearch).
spo_set_tenant_restricted_access_control
Pro · Destructive
Change the tenant-level restricted access control settings (Set-SPOTenant).
spo_start_data_access_governance_report
Pro · Write
Start a Data Access Governance report that finds oversharing (Start-SPODataAccessGovernanceInsight).
spo_start_restricted_content_discovery_report
Pro · Write
Start the restricted content discovery report, which lists sites that have restricted content discovery (Start-SPORestrictedContentDiscoverabilityReport).
spo_start_site_access_review
Pro · Destructive
Ask the owners of one site to review who has access to it (Start-SPOSiteReview).

Raw Requests

ToolWhat it does
spo_raw_get
Free · Read-only
Send a GET to the tenant's SharePoint admin host at a path you supply, for a read this connector has no typed tool for.
spo_raw_request
Pro · Destructive
Send a write to the tenant's SharePoint admin host at a path you supply, for a change this connector has no typed tool for.