Author Archives: Dan

Two 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 (/_layouts/15/FileBrowser.aspx) You can embed these aspx pages in an iFrame … Continue reading

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

Advanced 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 blocked: Advanced declarative agent can’t be deployed due … Continue reading

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

How 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.

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

Moving 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 when you need to move term sets … Continue reading

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

New-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 :

But this did not work for me. All I got back was an … Continue reading

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

Azure 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. For us, our Azure Functions suddenly started … Continue reading

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

Securing 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. Updated: Use SharePoint Online Web Client Extensibility … Continue reading

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

Using 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 sometimes only reasonable way … Continue reading

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

Attaching 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 … Continue reading

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

Better 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, not just single items. (My understanding is that … Continue reading

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