on-behalf-of flow

Pass user’s identity and authorization from an SPFx web part to an Azure Function to another web API using OAuth 2.0 On-Behalf-Of flow

There are many use cases which you need to call a service/web API from another Web API and it requires to propagate the delegated user identity and permissions through the request chain. OAuth 2.0 On-Behalf-Of flow helps you to authorize access from the gateway to the downstream APIs without losing trace of the user. In this post I will show you how to use a SharePoint Framework web part as a client application communicates with…

Office Add-in and MSAL

Office Add-ins: Get consent for several resources using MSAL

In this blog post we will see how to setup MSAL to get consent for several resources in an office add-in to get access to Microsoft Graph, SharePoint and a secured Azure functions. If you are looking for the source code, you can find it here 🙂 Create a word add-in project First we need to install Yeoman (as a prerequisites) and generator-office to create an office add-ins: Then run following command and create a…

Moving from Azure functions to AWS Lambda, all you need to know

Recently I’ve had a challenge of moving some Azure functions to AWS Lambda, some of these functions interact with Office 365 through Graph API, and we also had a function for uploading multipart files to Azure blob storage that needed to be replaced with S3 bucket. Setup development environment It was the first time I wanted to develop something in AWS so first I needed to understand the similarities between Azure and AWS and try…

SharePoint Framework, Azure Function and React Hooks, where the magic happens – part 2

In the previous post we developed the functions to get and apply a provisioning template using PnP core library and deployed them to the Azure Portal, then we configured the Application Registration by uploading the certificate needed for authentication process and added API permissions we need to do the operations on SharePoint. In this post we will implement the web part to call our functions and also we will learn how we can use some…