Downloading OneNote content with Export-OneNote
With this PowerShell script you can easily extract OneNote artifacts for further processing: Download most notebook data, including structure, pages, images and attached files Pages are processed into...
View ArticleTwo Hidden Gems for SharePoint developers: File Browser & File Picker
Did you know you can show SharePoint in an iFrame or a popup to let users browse libraries and pick files? Microsoft offers two controls: File Picker (/_layouts/15/FilePicker.aspx) File Browser...
View ArticleAdvanced declarative agent can’t be deployed
I was trying out Microsoft 365 Agents Toolkit in VS Code, building an agent using TypeSpec, but it failed to provisioning to my M365 developer tenant, with the following error: Error: Deployment...
View ArticleHow to get “order” and “level” for pages in OneNote Graph API
Quick tip: To include the order and level properties when getting pages with the Graph OneNote API, you need to add ?pagelevel=true to your request. This is not mentioned in the documentation.
View ArticleMoving Term Sets Accross Site Collection Maintaining Term ID:s
In SharePoint we have the Term Store for managing reusable terms. Besides tenant level term groups, which are available to all site collections, each site can have their own group. There are situations...
View ArticleNew-MgOauth2PermissionGrant : Missing property: clientId
I was trying to add some permissions to the (new) SPFx app. This is done using the New-MgOauth2PermissionGrant cmdlet. All examples shows using it with -BodyParameter :$params = @{ "clientId" =...
View ArticleAzure Functions suddenly returning 403 when called from SPFx
Microsoft has recently made a change to SharePoint Framework that might break existing solutions that use an Azure backend (e.g. a Function App) that is secured to only allow requests from SPFx apps....
View ArticleSecuring an Azure Function with Entra ID and calling it from SPFx
This post outlines how to limit access to an Azure Functions App so that only tenant users can access it, and how to then consume this function from an SPFx app in SharePoint. Preparations Your...
View ArticleUsing emojis for easier JavaScript debugging
I normally don’t care much for emojis, but lately I’ve found them to be helpful when working with JavaScript. The JavaScript console may not be the most elegant way to debug, but it’s the quickest and...
View ArticleAttaching a context menu to DetailsList column headers in Fluent UI
I wanted to show a menu when clicking the column headers of a DetailsList, similar to how SharePoint does it. Fluent UI 8 does not have any built in support for this, so I had to figure out a way to do...
View ArticleBetter cache management in ASP.Net Core (LazyCache/FusionCache)
LazyCache and the newer FusionCache are two great libraries that simplifies working with caching in ASP.Net Core. Something I’ve often been missing though is the ability to dispose of the entire cache,...
View ArticleModifying SharePoint list permissions with PnP Core
Working with SharePoint permissions is not always straight forward. This code snippet is an exercise using PnP Core to modify permissions on lists with unique (broken) permissions. All assigned...
View ArticleShow React dialogs fluently with hooks and promises
Suppose you have a React component that displays a modal dialog and returns the result:<Dialog message="Are you sure?" onClose={onCloseDialog}>The typical way to use it would be to have a state...
View ArticleA 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:IList list = await context.Web.Lists.GetByTitleAsync(listName); IListItem item = await...
View ArticleSearching 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...
View ArticleFinding 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...
View ArticleStarter project for AzureAD authenticated communication with ASP.Net Core 6...
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...
View ArticleRead & 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...
View ArticleIf 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...
View ArticleExcluding 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...
View Article