Skip to main content

Microsoft 365

A SharePoint Online source points Access Analyzer at the SharePoint Online service of one Microsoft 365 tenant. Access scans crawl the tenant's site collections, including OneDrive personal sites, and record sites, lists, libraries, folders, documents, sharing settings, sharing links, permissions, and SharePoint groups. Sensitive data scans open the documents and look for sensitive data patterns.

Authentication uses an app registration with a certificate rather than a client secret, so the setup has one extra step: you upload the service account's public certificate to the app registration in the Microsoft Entra admin center.

For an end-to-end walkthrough, see Scan SharePoint Online.

Prerequisites​

App Registration​

In the Microsoft Entra admin center, register an application in the tenant that owns the SharePoint Online sites. The scan uses the OAuth 2.0 client credentials flow, so no user signs in. On the app registration:

  1. Copy the Application (client) ID and the Directory (tenant) ID from Overview.

  2. Under API permissions, add the following application permissions:

    APIPermissionDescription
    Microsoft GraphSites.Read.AllRead items in all site collections; scans use it to find the tenant's root site and list every site collection
    Microsoft GraphDirectory.Read.AllRead directory data; scans use it to read the guest access setting for Microsoft 365 groups and to check whether a group-connected site belongs to a team in Microsoft Teams
    SharePointSites.FullControl.AllFull control of all site collections; SharePoint Online has no read-only application permission that includes permission entries, so scans need this permission to read the tenant's sharing settings and the permissions on every site collection
  3. Grant admin consent for the tenant.

  4. Leave Certificates & secrets for later: you upload the certificate after creating the service account in Access Analyzer.

note

Registering the application and granting admin consent requires a user account with the Global Administrator, Application Administrator, or Cloud Application Administrator role.

Service Account​

SharePoint Online sources use a Client ID and certificate service account. It carries the Client (application) ID, the Tenant ID, and a certificate. The tenant ID belongs to the service account, not the source; the source records only the SharePoint domain and the cloud. Under Certificate, choose one of two options:

  • Generate for me (default). Access Analyzer generates a self-signed RSA-2048 certificate, valid for one year, when you save the account. Click Download certificate (.pem) on the confirmation step.
  • Upload my own. Provide a single .pem file, up to 1 MB, containing the certificate and its unencrypted private key. Access Analyzer doesn't accept .pfx files or password-protected keys.

After you save the account, upload the public certificate to the app registration:

  1. In the Microsoft Entra admin center, open the app registration.
  2. Go to Certificates & secrets.
  3. Upload the public certificate.

Scans can't authenticate until the certificate is on the app registration. Repeat the upload whenever you regenerate or replace the certificate.

Entra ID Sync for Names and Group Members​

Access scans record a Microsoft Entra ID user or group that holds a permission by its object ID only. They don't read the account's name or a group's members. That information comes from an Entra ID source for the same tenant: after a SharePoint Online scan, the Refresh CDM report tables step rebuilds the reports and expands Entra ID groups using the memberships the most recent Entra ID sync recorded. CDM stands for common data model, the shared format Access Analyzer stores every source's data in. Without one, the reports can't show names for Entra ID users and groups or expand Entra ID group membership. Add an Entra ID source for the tenant and sync it before your first SharePoint Online scan.

Network​

The agent that runs the scan needs outbound HTTPS access to Microsoft's sign-in service, to Microsoft Graph, and to three SharePoint hosts of the tenant: the one you enter in SharePoint domain, its OneDrive counterpart, and its SharePoint admin counterpart, for example contoso.sharepoint.com, contoso-my.sharepoint.com, and contoso-admin.sharepoint.com. The admin host serves the tenant's sharing settings and site collection properties.

The sign-in and Graph hosts depend on the Azure cloud you select:

Azure cloudSign-inMicrosoft GraphSharePoint domain suffix
Azure (Commercial) and Azure Government (GCC)login.microsoftonline.comgraph.microsoft.comsharepoint.com
Azure Government (GCC High)login.microsoftonline.usgraph.microsoft.ussharepoint.us
Azure Government (DoD)login.microsoftonline.usdod-graph.microsoft.ussharepoint-mil.us
Azure China (21Vianet)login.chinacloudapi.cnmicrosoftgraph.chinacloudapi.cnsharepoint.cn

You choose the agent in the scan's Agent field; see Agents.

Add a SharePoint Online Source​

  1. Go to Configuration > Sources.
  2. Click Add source.
  3. In Source type, select SharePoint Online.
  4. Under Details, enter a Name.
  5. Add a Description and Labels if you want them; see Labels.
  6. Under Connection, enter the SharePoint domain.
  7. If the tenant isn't in the commercial cloud, change Azure cloud.
  8. Under Access, select the service account you created.
  9. Click Test connection and wait for Connection successful.
  10. Click Add source.

Add source dialog with SharePoint Online selected

The Connection fields:

FieldRequiredWhat to enterDefault
SharePoint domainYesThe host of the tenant's root SharePoint site, for example contoso.sharepoint.com. Enter the root host, not the OneDrive (-my) or admin (-admin) host. It must belong to the tenant of the service account's app registration.None
Azure cloudNoThe Azure cloud environment that hosts the tenant: Azure (Commercial), Azure Government (GCC), Azure Government (GCC High), Azure Government (DoD), or Azure China (21Vianet).Azure (Commercial)

Changing SharePoint domain on an existing source shows the warning Existing scan data won't follow this change: data already collected stays with the old domain. To rename the source, change Name instead.

Test Connection​

Test connection signs in to the tenant with the service account's client ID and certificate. The button becomes available after you enter a SharePoint domain and select a service account. The test runs these checks in order and stops at the first one that fails:

CheckMessage when it fails
The service account's certificate contains a certificate and an unencrypted private keyThere was an error with the certificate.
Microsoft Graph returns the tenant's root siteFailed to determine SharePoint admin URL from root site.
The app registration holds the permissions listed in App registrationCredentials do not contain the required permissions: followed by each missing permission, for example Microsoft Graph: Sites.Read.All
SharePoint domain is the root site host of the tenant the credentials belong toThe source's SharePoint domain <domain> is not the root site host of the tenant the credentials belong to (<root host>); fix the domain or use that tenant's app registration.
SharePoint REST returns the root siteSharePoint REST returned HTTP <status> for the root site.

The permissions check also accepts a broader permission in place of each one: Directory.ReadWrite.All for Directory.Read.All, and Sites.ReadWrite.All, Sites.Manage.All, or Sites.FullControl.All for the Microsoft Graph Sites.Read.All.

Success shows the message Connection successful. Failure shows an alert titled Connection failed with the reason. When signing in fails, the reason starts with Authentication failed: and includes the error from the Microsoft identity platform.

Access Scans​

Access scans crawl everything within the scope you set on the scan, on every run; there is no differential mode for this source type. Collected attributes lists every value they store.

Access scans skip some content on every run, whatever the scope:

  • Archived site collections, the content type hub, and the root site of the OneDrive host. For the SharePoint admin site collection, the scan records the site collection and its permissions but not its contents.
  • The permissions and contents of a site collection locked with No access. The scan records the site collection itself, with its URL, type, lock state, and sharing settings, so reports can show that it exists and is locked.
  • The hidden Sharing Links list, lists and libraries with no items, and system lists and libraries such as Site Pages, Site Assets, Style Library, Preservation Hold Library, and anything under _catalogs or _layouts.
Built-in exclusion patterns for sites, lists, folders, and documents

The scan skips every object whose URL matches one of these patterns. The * wildcard matches any run of characters.

  • */_catalogs*
  • */_layouts*
  • */SitePages*
  • */SiteAssets*
  • */User Photos*
  • */Style Library*
  • */IWConvertedForms*
  • */TaxonomyHiddenList*
  • */FormServerTemplates*
  • */PublishedFeed*
  • */Access Requests*
  • */Sharing Links*
  • */Lists/SharePointHomeCacheList*
  • */Lists/userActivityFeedHiddenList*
  • */Lists/notificationSubscriptionHiddenList*
  • */Social/FollowedContent*
  • */PreservationHoldLibrary*
  • */Reference *
  • */Collection *
  • */Social/Private/FollowedSites*

The scan's options control the scope:

OptionDefaultEffect
Workers3, or 24 with service prioritizationConcurrent workers, from 1 to 64. Each worker sends its own SharePoint requests. Keep 3 for an app registration with the regular SharePoint Online request limits. When the app registration has service prioritization in SharePoint enabled, set Workers to 24 yourself, because the form always fills in 3.
Include site collectionsScan all URLsSelect Include specific site collections and enter exact site collection URLs, such as https://contoso.sharepoint.com/sites/marketing, to scan only those. The form doesn't accept wildcards here. Matching ignores case and a trailing slash.
Exclude site collectionsEmptySite collections to skip. Supports the * wildcard.
Exclude URLsEmptyURL patterns for subsites, lists, libraries, folders, documents, and list items to skip within the scanned site collections. Supports the * wildcard. A pattern matches the whole URL, ignoring case, so a pattern without a wildcard matches only the object at exactly that URL. To skip a library or folder and everything in it, end the pattern with /*, for example https://contoso.sharepoint.com/sites/hr/Shared Documents/*.
Collect OneDriveOnInclude OneDrive personal sites when Include site collections is set to Scan all URLs. When you list specific site collections, the scan covers exactly those, including any OneDrive URL you list, and this option has no effect.

Exclude rules take precedence over include rules: the scan skips a site collection that matches both.

More workers finish sooner but use up the app's SharePoint request budget faster. When SharePoint or Microsoft Graph throttles a request, every worker pauses for the time the service asks for, or for an increasing delay when it doesn't say. Access Analyzer retries a request that fails with a temporary server error after an increasing delay, up to six attempts in total. Beyond 3, or 24 with service prioritization, raise Workers only while scans run without throttling.

Service prioritization in SharePoint is a Microsoft 365 pay-as-you-go service that raises an app's SharePoint resource limits to between 2 and 10 times the regular limits, so SharePoint throttles the app after every other app in the tenant. A SharePoint Administrator or Global Administrator enables it for the app registration's Application (client) ID, in the Microsoft 365 admin center or with SharePoint Online PowerShell, after connecting a billing policy backed by an Azure subscription. Microsoft bills the app's requests above the regular limits. Access Analyzer doesn't detect whether an app is prioritized, so set Workers yourself. See Service prioritization in SharePoint for the prerequisites, pricing, and setup steps.

See Scan types for how these options appear when you create a scan.

Sensitive Data Scans​

Sensitive data scans read the contents of the documents an Access scan found and match them against the enabled sensitive data patterns. Their options narrow which documents they read:

OptionDefaultEffect
Include site collectionsEmpty (all)Site collection URLs whose documents to read. Supports the * wildcard. A pattern can name the site collection itself or the documents under it.
Exclude site collectionsEmptySite collections whose documents to skip. Supports the * wildcard and matches the same way as Include site collections.
Exclude object URLsEmptyDocument URL patterns to skip. Supports the * wildcard; a pattern without a wildcard matches only the document at exactly that URL.
Differential scanOffRead only documents whose content changed since this scan last classified them. Access Analyzer compares the content hash that SharePoint keeps for each file.

The scan skips empty documents, and the SharePoint scanning card in Application settings decides which other documents it reads. It skips documents larger than Maximum file size (MB) (10 MB by default). While Use include list is on, the default, it reads only documents whose extension is on Include list; with the switch off, or with an empty include list, it skips documents whose extension is on Exclude list. When the tenant throttles requests, the scan backs off and retries.

The collected data drives the Data security dashboard and the SharePoint Data reports.

Collected Attributes​

This section is a reference list of what an Access scan reads from SharePoint Online and stores. The Attribute column shows the name Access Analyzer stores the value under, and Source shows the SharePoint or Microsoft Graph property it comes from. Dates are in Coordinated Universal Time (UTC), and a date is empty when SharePoint reports none or reports a value before 1900 or after 2299.

Each record also carries identifiers, links to its parent object, path segments, and timestamps that Access Analyzer uses to track the object across scans and rebuild its URL; they aren't listed.

Tenant​

One record per tenant, read from the SharePoint tenant administration API on the admin host and from Microsoft Graph.

AttributeSourceDescription
nameDerived from RootSiteUrlHost of the tenant's root site, for example contoso.sharepoint.com.
sourceSystemIdService account Tenant ID, or Graph organization.idDirectory (tenant) ID of the tenant, a globally unique identifier (GUID). When the service account holds a tenant name instead of a GUID, Access Analyzer reads the ID from Microsoft Graph.
spoSharingCapabilitiesSharingCapabilityExternal sharing level for SharePoint across the tenant: Disabled (people in your organization only), ExistingExternalUserSharingOnly (existing guests only), ExternalUserSharingOnly (new and existing guests, who must sign in), or ExternalUserAndGuestSharing (anyone, including links that don't require sign-in). Access Analyzer also stores this value as a tenant-wide setting that the reports read.
spoOdbSharingCapabilitiesODBSharingCapabilityExternal sharing level for OneDrive across the tenant, with the same values as spoSharingCapabilities.
everyoneClaimVisibleShowEveryoneClaimtrue when people pickers offer the Everyone claim, which lets people share with every user, including guests.
allUsersClaimVisibleShowAllUsersClaimtrue when people pickers offer the All Users claim.
allowGuestsInGroupsAccessGraph group setting AllowGuestsToAccessGroupstrue when guests in Microsoft 365 groups can access group content. Access Analyzer records true when the setting isn't defined or can't be read, which matches the Microsoft 365 default.
sharingDomainRestrictionModeSharingDomainRestrictionModeHow the tenant limits sharing by domain: None, AllowList (sharing only with the listed domains), or BlockList (sharing with every domain except the listed ones).
sharingAllowedDomainsSharingAllowedDomainListComma-separated domains that external sharing is limited to.
sharingBlockedDomainsSharingBlockedDomainListComma-separated domains that external sharing is blocked for.

Site Collections​

One record per site collection in scope. Sharing and script settings come from the tenant administration API; the rest comes from the site's own SharePoint REST API.

AttributeSourceDescription
nameWeb.TitleTitle of the site collection's root site. When the title is empty, or the site collection is locked with No access, the last segment of the URL.
descriptionWeb.DescriptionDescription of the root site, when it has one.
createdDateRoot web CreatedWhen the site collection was created. Empty for a site collection locked with No access.
modifiedDateRoot web LastItemUserModifiedDateWhen a user last changed an item in the site collection's root site. SharePoint doesn't update this value for system changes, such as its own updates to hidden lists, so it reflects the last real change. Empty for a site collection locked with No access.
sourceSystemIdGraph site.webUrlFull URL of the site collection, for example https://contoso.sharepoint.com/sites/marketing.
spoSiteIdSite.IdID of the site collection, a GUID.
spoWebIdWeb.IdID of the site collection's root site, a GUID.
spoCollectionTypeDerived from Graph isPersonalSite, the URL, and the Microsoft 365 groupKind of site collection: Personal for a OneDrive personal site, Team for a site connected to a team in Microsoft Teams, Admin for the SharePoint admin site, or Default for every other site, including communication sites and group-connected sites without a team.
externalSharingPolicySharingCapability (site properties)External sharing level of this site collection, with the same values as the tenant's spoSharingCapabilities.
accessBlockedLockState (site properties)true when the site collection is locked with No access. The scan records such a site collection without its permissions or contents.
writesBlockedSite.ReadOnly, or the No access locktrue when the site collection is read-only, including when it's locked with No access.
spoLockStatusDerived from Site.ReadOnly and LockState (site properties)Lock state of the site collection: NoLocked, ReadOnly when it's read-only, AddContentPrevented when it's locked against new content (NoAdditions), or NoAccess when it's locked with No access.
spoDenyAddAndCustomizePagesDenyAddAndCustomizePagesCustom script setting: Enabled means users can't add custom scripts, Disabled means they can, and Unknown means SharePoint didn't report it.
sharingDomainRestrictionModeSharingDomainRestrictionMode (site properties)How this site collection limits sharing by domain: None, AllowList, or BlockList.
sharingAllowedDomainsSharingAllowedDomainList (site properties)Comma-separated domains that sharing from this site collection is limited to.
sharingBlockedDomainsSharingBlockedDomainList (site properties)Comma-separated domains that sharing from this site collection is blocked for.

Sites​

One record per subsite below a site collection's root site.

AttributeSourceDescription
nameWeb.TitleTitle of the subsite. When the title is empty, the last segment of the URL.
descriptionWeb.DescriptionDescription of the subsite, when it has one.
createdDateWeb.CreatedWhen the subsite was created.
modifiedDateWeb.LastItemUserModifiedDateWhen a user last changed an item in the subsite. SharePoint doesn't update this value for system changes.
sourceSystemIdWeb.UrlFull URL of the subsite.
spoSiteIdDerived from the parent site collectionID of the site collection the subsite belongs to.
spoWebIdWeb.IdID of the subsite, a GUID.

Lists and Libraries​

One record per list or library that holds at least one item. Access Analyzer records a list as a document library when its base template (List.BaseTemplate) is 101, and as a list otherwise.

AttributeSourceDescription
nameList.TitleDisplay name of the list or library, for example Documents.
sourceSystemIdDerived from List.RootFolder.ServerRelativeUrlFull URL of the list's root folder, for example https://contoso.sharepoint.com/sites/hr/Shared Documents.
spoListIdList.IdID of the list or library, a GUID.
createdDateList.CreatedWhen the list or library was created.
modifiedDateList.LastItemUserModifiedDateWhen a user last changed an item in the list or library. SharePoint doesn't update this value for system changes.

Folders, Documents, and List Items​

One record per item in a scanned list or library. Access Analyzer classifies each item by the name of its content type: a document when the name is Document, Documento, Dokument, Asset Portal Document, or Know-How Collection, a folder when it's Folder, Cartella, or Ordner, and a list item otherwise.

AttributeSourceDescription
nameFileLeafRefFile or folder name, or the item's last URL segment.
sourceSystemIdDerived from FileRefFull URL of the item.
createdDateCreatedWhen the file, folder, or list item was created in SharePoint.
modifiedDateModifiedWhen the file, folder, or list item was last changed.
spoDocumentIdUniqueIdUnique ID of a document, a GUID. Sensitive data scans use it to download the file. Folders and list items don't carry it.

A permission set records that an object has its own permissions. Every site collection gets one; a subsite, list, library, folder, document, or list item gets one only when it doesn't inherit permissions from its parent. Each sharing link on a folder, document, or list item gets a separate set of its own type, which carries the link attributes in the following table.

AttributeSourceDescription
permissionGrantIdObject Id or UniqueId, or link ShareIdFor a role assignment set, the object's own GUID. For a sharing link, the link's share ID.
linkTypeDerived from link ScopeWho the link works for: Anonymous (anyone with the link), Organization (people in your organization), or SpecificPeople (the people it was sent to).
sharingTypeDerived from IsEditLink, IsReviewLink, and BlocksDownloadWhat the link allows: CanEdit, CanReview, CannotDownload (view only, without downloading), or CanView.
isActiveIsActive and Expirationtrue when SharePoint reports the link as active and its expiry date hasn't passed.
allowsAnonymousAccessAllowsAnonymousAccesstrue when the link works without signing in.
requiresPasswordRequiresPasswordtrue when the link requires a password.
hasExternalGuestInvitesHasExternalGuestInviteestrue when the link was sent to people outside the organization.
linkExpirationDateExpirationWhen the link expires, in UTC. Empty when the link doesn't expire.
createdDateCreatedWhen the link was created, in UTC.
modifiedDateLastModifiedWhen the link was last changed, in UTC.
createdByIdCreatedByPrincipal who created the link.
modifiedByIdLastModifiedByPrincipal who last changed the link.

Permissions​

One record per principal on each permission set. For a role assignment set, a principal's rights are the combination of every permission level assigned to it on the object. Access Analyzer leaves out assignments that grant only Limited Access, and gives the Site Collection Administrators group full control on every object that has its own permissions. A sharing link grants rights to the Anonymous Users group for an anyone link, to the Authenticated Users group for a people-in-your-organization link, or to each person a specific-people link was sent to. An edit link grants the rights of the Contribute permission level, a view or review link those of Read, and a link that blocks downloads a restricted set of view rights.

AttributeSourceDescription
principalIdRoleAssignments.Member, or link principals and inviteesThe principal that holds the rights: a SharePoint group, an Entra ID user or group (by object ID), or a user that Entra ID doesn't manage.
permissionMaskDerived from RoleDefinition.BasePermissionsCombined SharePoint base permission mask, stored as a signed 64-bit number. Full control is 9223372036854775807.
permissionTypesDerived from permissionMaskOne entry for each SharePoint base permission the mask grants, such as ViewListItems or ManagePermissions.
listAllowedDerived from permissionMasktrue when the mask grants ViewListItems.
readAllowedDerived from permissionMasktrue when the mask grants any of ViewVersions, ViewPages, EnumeratePermissions, CreateAlerts, or ViewUsageData.
writeAllowedDerived from permissionMasktrue when the mask grants any right that adds or changes content or structure: AddListItems, EditListItems, ManageLists, CancelCheckout, ManageSubwebs, AddAndCustomizePages, CreateGroups, EditMyUserInfo, UpdatePersonalWebParts, AddDelPrivateWebParts, ApplyStyleSheets, or ApplyThemeAndBorder.
deleteAllowedDerived from permissionMasktrue when the mask grants any of DeleteListItems, DeleteVersions, ManageLists, CancelCheckout, AddAndCustomizePages, or AddDelPrivateWebParts.
manageAllowedDerived from permissionMasktrue when the mask grants any of ManageLists, ApproveItems, ManagePermissions, ManageWeb, ManageAlerts, or ManageSubwebs.
adminAllowedDerived from permissionMasktrue when the mask grants ManageLists.
limitedAccessAllowedDerived from permissionMasktrue when the mask grants any of ViewFormPages, BrowseUserInfo, UseRemoteAPIs, UseClientIntegration, or Open, the rights behind the Limited Access permission level.
memberRoleDerived from the member's login nameOwner when the principal is the owners of a Microsoft 365 group, otherwise Member.

Principals​

Access scans record SharePoint groups, claim-based groups such as Everyone, and users that Entra ID doesn't manage, such as guests invited by email. Entra ID users and groups appear in permissions and memberships by object ID only; an Entra ID source records their details.

AttributeSourceDescription
nameGroup.Title, or the user's email or LoginNameGroup title, or the email address or login name of a user that Entra ID doesn't manage.
displayNameGroup.Title, or the user's email or LoginNameName shown in the reports.
emailAddressUser.EmailEmail address of a user that Entra ID doesn't manage, when SharePoint has one.
sourceSystemIdLoginNameSharePoint login name of the group or user.
spoGroupIdGroup.IdNumeric ID of a SharePoint group within its site collection. Access Analyzer adds three groups to every site collection: -1 Site Collection Administrators, -2 Anonymous Users (holders of anyone links), and -3 Authenticated Users (holders of people-in-your-organization links).
spoSiteCollectionIdDerived from Site.IdID of the site collection the group belongs to.
spoOwnerTitleGroup.OwnerTitleName of the group's owner.
memberCountDerived from Group.UsersNumber of direct members of a SharePoint group. For Site Collection Administrators, the number of site collection administrators.
wellKnownGroupTypeDerived from LoginNameFor a claim that stands for a broad audience, which one: Everyone, Everyone except external users, Authenticated Users, or one of the two All Users claims.

SharePoint Group Memberships​

One record per member of each SharePoint group, and per site collection administrator in the Site Collection Administrators group.

AttributeSourceDescription
groupIdGroup.IdThe SharePoint group.
memberIdGroup.Users, or IsSiteAdmin site usersThe member: an Entra ID user or group (by object ID) or a user that Entra ID doesn't manage.
memberSetDerived from the member's login nameOwners when the member is the owners of a Microsoft 365 group, otherwise Members.

Sensitive Data Scan Attributes​

Sensitive data scans locate each document by the spoDocumentId and URL the Access scan stored. For each document they read, they also record SharePoint's content hash for the file (vti_streamhash), which a Differential scan compares to tell whether the document changed.