Author Archives: Dan

Show React dialogs fluently with hooks and promises

Suppose you have a React component that displays a modal dialog and returns the result:

The typical way to use it would be to have a state variable controlling if it should be displayed or not, and a function … Continue reading

Posted in Development, Tutorials | Tagged , , , , , , , , | Leave a comment

A faster way to get effective permissions with PnP Core

PnP Core SDK has built in functionality to get effective permissions for a user on a list item in SharePoint:

This is pretty slow; typically ~1000ms. So I tried calling the REST API directly instead:

Turns out this … Continue reading

Posted in Development, Tips | Tagged , , , , , | Leave a comment

Searching with Microsoft Graph Client Library for .NET

Using the MS Graph SDK for .NET is convenient but I find the documentation and examples pretty lacking. So when wanted to use the Search endpoint it took me quite a while to figure out how to make it work. … Continue reading

Posted in Development, Tips | Tagged , , , | Leave a comment

Finding out what service created a SharePoint site

SharePoint is the underpinning data storage for many Microsoft 365 services. Sites are are therefore created under the hood by many services. Sometimes it it useful to know from where a site was created. We can actually find this in … Continue reading

Posted in Development | Tagged , , , , | Leave a comment

Starter project for AzureAD authenticated communication with ASP.Net Core 6 API, React SPA and console app

Setting up authentication for a new project is important but can be a pain since all the pieces must fit together perfectly. I recently struggled with one of my projects, and for future reference I decided to create a starter … Continue reading

Posted in Development, Tutorials | Tagged , , , , , , , , , , , | 2 Comments

Read & Write MS Office custom properties with PowerShell

While working on automating Microsoft Word I needed to read and write custom properties in documents. I found several resources out there. Reading worked fine, but when writing custom properties they all crashed. I finally managed to fix it though, … Continue reading

Posted in Development, Tutorials | Tagged , , , , , , | 1 Comment

If Word randomly crashes when opening SharePoint documents

I’ve been working on a PowerShell script that automates Microsoft Word to open all files in a SharePoint library, modify the header and other properties and then save it again. I ran the script against 4000 documents and everything went … Continue reading

Posted in Development, Tips | Tagged , , , , , , , , | Leave a comment

Excluding page templates in CAML queries

Typically, when requesting SharePoint pages we do not want to include templates, just normal pages. When saving a SharePoint page as a template, this is noted in a property called OData__SPSitePageFlags . With this information we can easily exclude templates by … Continue reading

Posted in Development, Tips | Tagged , , , | Leave a comment

Open a SharePoint list in classic experience if link is missing

The modern list experience in SharePoint is the default by now. But you can still revert to classic experience by clicking the link under the left navigation. But on communication sites the left nav is turned off by design. If … Continue reading

Posted in Tips | Tagged , , , , , | Leave a comment

Where is “Tenant Wide Extensions” list when using Site Collection App Catalogs?

A fairly new feature in SharePoint Online is the ability to have Site Collection App Catalogs. Neat. Even “Tenant Wide” application customizers work (though they are of course scoped to only the site collection). Creating a Site Collection App Catalog … Continue reading

Posted in Development, Tips | Tagged , | Leave a comment