Photo by iMattSmart on Unsplash

Implementing a simple reusable authorization attribute using the Microsoft Identity Platform to validate access tokens and authorize users based on their app roles in serverless Azure Function apps.

Azure offers a builtin middleware for Authentication the can be easily configured in the Azure Portal and allows for simple authorization tasks. But it also has two major disadvantages:

  • doesn’t support more advanced authorization needs, e.g. validation user membership in a app role
  • near impossible to debug if something is going wrong inside the middleware. …

Original photo, Icon

How to write a RESTful http service to print PDFs on any local or network printer using Javascript and node.js to automate your logistics (e.g. shipping labels) or any other process that still needs some paper.


Step by step

Let’s start by creating a new node project using npm (the node package manager) in an empty folder:

npm init

We are going to use two packages to write our service:

  1. pdf-to-printer, a utility to print PDF files from Node.js

So we need to install these packages using npm:

npm i express --save
npm i pdf-to-printer…

Original Background Photo by Zahra Amiri on Unsplash, Icons by Microsoft

Microsoft introduced a new image column type to SharePoint online that is really handy with the new list experience. Using this column type with the Microsoft Graph is not well documented and can be a bit intimidating at the beginning. This article will give an E2E example on how to write to a list that has an image column using the Microsoft Graph APIs with Azure Functions.

Microsoft Lists is an existing new app that builds on top of the existing SharePoint lists, integrates with many other O365 apps like teams and offers a really nice user experiences and templates to get started to organize things like checklists, event itineraries, issues and assets.

Performing advanced queries in input bindings to Azure Table Storage when using Azure Functions with Node.js and why maybe this is not a good idea.

I really like to use bindings when working with Azure Functions, especially with node.js, as it’s much less code to write, test and maintain to retrieve and write data or interact with other cloud services.

E.g. its super easy to retrieve rows of a partition of an Azure Table with a binding and without having to create code to connect to Azure Table and query a table.

Let’s think of this scenario: We want to create a RESTful API endpoint to retrieve all orders for a given customer:

So we have a route with a url parameter of customerId…

Original photo by Jan Antonin Kolar on Unsplash

How to built a cloud native app with Azure Functions to create, design and connect to a Azure Database for PostgreSQL using .Net Core and EntityFramework Core


Azure Functions are a lightweight, inexpensive and scalable alternative to write backend functionality. If you’ve written your backends so far in ASP.NET (Core) and connected to your relational database using EntityFramework (Core) you might wonder if this also works in a C# Function app? Turns out yes with some quirks!

In this sample I’m going to walk through the steps necessary to design a model first database using EntityFramework Core, connect to an Azure PostgreSQL database and provide simple CRUD (create, read, update, delete) functionality as a REST-style http endpoint.


  • Azure Subscription, create your free account with $200 credit here…

Our popup late night studio @ Gieske Studios, Pforzheim

Introduction to our studio, hardware and software setup. How we planned and executed the production and what we would do different next time.

Sometimes ideas go places. When I proposed to our local government to produce a late night show style live stream on Youtube instead of a more traditional video conference format as a COVID-19 replacement for a in person event I would have never thought that in the end we as a team of software engineers would be the ones doing the actual production. Especially as I asked the mayor of our 120k city of Pforzheim, Peter Boch, to be the talk host. To my surprise neither the mayor nor any other official said no so we ended up here:

Original photo by Pero Kalimero on Unsplash

While offering a great out-of-the-box experience with repos in GitHub, setting up a cloud based dev environment with Visual Studio Codespaces and repos located in Azure DevOps requires some extra steps.


Visual Studio Codespaces provide a cloud based dev environment as a service and work with a lot of languages and runtimes like .NET Core, Node, Python and many other. Learn more about this service here:

I 💗 this service as I can work from any machine just with Visual Studio Code installed or even through the browser and connect to different development environments in the cloud!

All guides I’ve found so far assume the one uses GitHub as a repo host. While there is nothing wrong with GitHub I mostly use Azure DevOps for my work projects to host…

Photo by Bekky Bekks on Unsplash

How to limit access to restful APIs in Azure Functions with .NET Core by assigning users to app roles in Azure Active Directory

In this previous post I discussed how to authenticate users in Azure Functions using Authentication/Authorization (formerly know as Easy Auth):

Authenticating users in a backend API built with .NET Core and running in Azure Functions is usually just the first step to control and limit access to resources and features to certain users or groups. Now that we know who the user is we need to decide whether to allow access to a resource based on app roles.

One important drawback to consider: app roles are created individually per app registration. This means that in typical client server situations…

Photo by Bekky Bekks on Unsplash

How to limit access to apps, routes and features in Angular by assigning users to app roles in Azure Active Directory

In this previous post I discussed how to authenticate users in Angular using the Microsoft authentication library (MSAL) and Azure Active Directory:

Authenticating users in an Angular app is usually just the first step to control and limit access in an app and to features. Now that we know who the users is and that the user is a member of our organization we want to decide whether to allow access to the app, certain areas or features of the app based on app roles.

One important drawback to consider: app roles are created individually per app registration. This…

How my friend Tom and I built a voucher online shop in just 3 days and raised over $50,000 powered by the Microsoft Azure Cloud.

As in almost every city in the world local businesses like shops, restaurants, bars, movie theatres and cultural venues had to close in my hometown of Pforzheim due to the COVID-19 pandemic.

In mid march our city administration reached out and asked if I could help build a digital platform to help our local economy retain some of their revenue through vouchers. So I teamed up with my friend Tom, a local web designer (, and we created a website within just 3 days that allows consumers to purchase vouchers in different sizes of their favourite restaurants, bar, shops etc.

Philipp Bauknecht

CEO @ medialesson. Microsoft Regional Director & MVP Windows Development. Father of identical twins. Passionate about great User Interfaces, NYC & Steaks

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store