news and know-how about microsoft, technology, cloud and more.

Use Azure Logic Apps with custom JSON payloads

Did you ever have the problem of pushing different JSON payloads to a logic app and hitting errors due to JSON schema mismatches? The usual HTTP Request forces you to define the JSON Schema at the beginning. For every tiny difference in the later used properties you need to create your own Logic App even if the process is the same. I will show you an example of a single Logic App deciding at runtime which JSON schema to use for decoding the post body payload. Stay tuned!We will start with an empty Logic App and the typical HTTP Request. This will trigger the logic app and start our journey.The HTTP post body schema is a simple one with a single value called "Request" of type string and a another one called "RequestValue" of type object. We are not going into more detail of the RequestValue object because we don't want the initial request to break if the rest of the JSON is different. So, we plan to call the endpoint with a HTTP POST request with a body similar as here:{"Request": "test1","RequestValue": "{ ...something... }"}As next action, we add a switch operation to react depending on the Request.This basic schema allows us to use the automatic created request property of the HTTP Request as input to our switch statement in the next step. Sample requests to this Logic App could be payloads as here:Version 1:{"Request": "test1","RequestValue": { "Testvalue" = "test" }}Version 2:{"Request": "test2","RequestValue": { "Testvalue1" = 1, "Testvalue" = "1234" }}etc...Each case in the switch statement corresponds to one version of JSON payload we can drop into the logic app.Based on the first "Request" Property value and the switch decision we can now build our second stage of JSON payload parsing. The Parse JSON step takes the object of the response value of the HTTP trigger and can be filled with different schemas for each execution tree in the switch statement.Above you see the schema for one of the payloads. A very simple one, but you can get as creative as you like or need to. You can test the logic app with different payloads with a few lines of powershell code (yes, you can use Postman or other tools, too). Just create a few more case statements in the switch and post different bodies to the Logic App as shown below.Invoke-RestMethod -Method Post -Uri $Uri -Headers $Header -Body $(Body1 | ConvertTo.Json)If we look at the output of the commands, we can see the response of the Logic App from the different Switch Paths.With these steps you can have a single Logic App to distinct between different JSON Payloads and react based on the initial HTTP requests without hitting an error on the first request. Dynamic requests can be handled with a single Azure Logic App.Have Fun!

Working with Azure AD schema extensions and Microsoft Graph

Azure Active Directory is Microsoft´s Cloud Identity system that stores user, license, group, apps, device data and more data in a secure way. As developers, we can extend many of these resources with custom extension. This can be useful to store additional metadata, such as a cost center or personal data for a user, for a group or other resource types. Unfortunately, there isn't much documentation on that. Here's how to do this step-by-step for the user resource with Azure AD schema extensions in real life.

PowerShell package 'Az.Accounts' failed to download

I recently ran into this problem: I had to install the Azure Az PowerShell module from the PowerShell Gallery on a new computer. Interestingly the installation with Install-Module -Name Az failed with the error message "WARNING: Source Location '' is not valid.". See my solution here.

Join us at the Global Microsoft 365 Developer Bootcamp - Austria

Global Microsoft 365 Developer Bootcamp is back! This year the event will take place virtually from more than 100 cities worldwide. Join us at our Microsoft 365 Developer Bootcamp - Austria on November, 13th, 2020!

Get Administrator roles and Privileged Identity Management roles of an Azure AD tenant

To ensure the security of your Microsoft 365 client, we recommend implementing an appropriate governance and security strategy. An effective measure is to determine the current administrators and their permissions. In this article, we want to identify administrators with permanent roles and administrators who can use roles with Privileged Identity Management (PIM). PIM provides just-in-time privileged access to Azure AD and Azure resources. See how to find all Administrators, including PIM, here.

Microsoft 365 Virtual Marathon and Microsoft 365 for crisis communication resources

Microsoft 356 helps you communicate from anywhere. Today, the Microsoft 365 Virtual Marathon online event starts and I show different services like the quick to use crisis communication SharePoint site the Microsoft Health Care Bot service and more. Check out the Microsoft 365 Virtual Marathon and see how to start with these two services here.

Watch our sessions of #GlobalAzure Virtual Austria 2020

As in the previous years, we were proud to be part of the Global Azure Virtual - formerly known as the Global Azure Bootcamp - event on April 24, 2020. Because of the Corona pandemic, the word-wide event went virtual and was distributed as Microsoft Teams Live events, organized by the Coding Club Linz. If you could not attend live, you now can watch some sessions that are already uploaded to Youtube. Find them here!

Get the daily Bing picture as background in your Teams meetings automatically

The Microsoft Bing Search Engine provides a professional and beautiful picture every day, you can see it online at With the Bing API, you can easily get the images for your own use, e.g. to use them as custom background image in your Microsoft Teams calls. See how this works and download the ready-to-use PowerShell script here.