Remove all sharing links and permissions for items in SharePoint Online or OneDrive for Business

A “proof of concept” script that you can use to remove all sharing links (sharing permissions) across all items stored in SharePoint Online and OneDrive for Business, including Teams sites. The script is indented to be run non-interactively and requires Sites.ReadWrite.All application permissions. …

Continue readingRemove all sharing links and permissions for items in SharePoint Online or OneDrive for Business

Reporting on SharePoint Online and OneDrive for Business item size with version history included using the Graph API

A Graph API based PowerShell script to report on storage usage in SharePoint Online and OneDrive for Business. The script allows you to generate a report down to individual items, with version history included, and can generate output resembling that of the Storage Metrics tool. You can run it against a single site, set of sites or all sites. …

Continue readingReporting on SharePoint Online and OneDrive for Business item size with version history included using the Graph API

My experience working with SharePoint/OneDrive for Business item versions via the Graph API

Before we get started, be warned – this is a rant post. While there are some interesting examples and potentially even some learnings you can find below, the post will predominantly focus on my frustration with (some of) the SharePoint Online endpoints on the Graph API. If you have more …

Continue readingMy experience working with SharePoint/OneDrive for Business item versions via the Graph API

Report on externally shared files in Microsoft 365 via the Graph API

An updated version of my “proof of concept” script to report on any and all externally shared files within the organization. This new version covers SharePoint Online sites as well and can also process individual sites via the -Sites parameter. The output has been reworked and now uses the ImportExcel module to generate a “pretty” Excel file with conditional formatting and clickable links. In addition, I’ve toyed with another version of the script that enumerates lists and list items, as opposed to the “classic” one that enumerates drives and processes them much like a traditional folder structure. Both versions should give you the same set of results, but can differ in performance and throttling aspect… …

Continue readingReport on externally shared files in Microsoft 365 via the Graph API

Granular permissions for working with files, list items and lists added to the Graph API!

Microsoft has extended their permissions model for working with files, list items and lists within the Graph API. The newly introduced Files.SelectedOperations.Selected, ListItems.SelectedOperations.Selected and Lists.SelectedOperations.Selected scopes are available in both delegate and application permission flavors and allow you to granularly control application access! At the same time, they use the same model the Sites.Selected permissions used, so you can easily adopt them. …

Continue readingGranular permissions for working with files, list items and lists added to the Graph API!