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!

Handle failed actions in Azure Logic Apps

Today┬┤s a quick tip for users working with Azure Logic Apps. This article shows how you can continue to work in a flow if an action has failed. This sample accesses an Excel file from a Microsoft teams SharePoint site and searches for a key. If the key was not found, the flow shall continue and deliver a useful error code with a message. See how this works here.

Send text and files (multipart/form-data) to an Azure Logic App and to SharePoint Online

Using an Azure Logic app is often a quick fix for small computing tasks. So my scenario is as follows: I want to use a form on a website to offer text fields and file upload. The submit button is intended to send the data to a Logic App. The Logic App receives the data and writes it to a SharePoint Online list and sends a notification if necessary. See the implementation here.

Join us at the Global Microsoft 365 Developer Bootcamp in Vienna!

We are excited to kick off the Global Microsoft 365 Developer Bootcamp in Vienna, Austria on November 27, 2019!

Working with Microsoft (Group) Forms and Flow

Microsoft Forms is very popular because it is a very easy way to create web forms quickly. You can create surveys, quizzes and simple forms, and easily see results as they come in. This quick tutorial shows how you can use Microsoft Forms, convert it to a group form, how you can access the result file and how to add additional tasks with Microsoft Flow or Azure Logic Apps.

Having fun with IoT Flic buttons and Microsoft Flow

I just got a cute Flic button to play around with. It takes only some minutes to connect that IoT button to a connector and execute customs tasks. Well, as first step, I simply created a message in a Microsoft Teams channel. See the step-by-step instructions here.

Groups Governance Toolkit Part 4-Ownerless Groups

In this multi-part series we show you how to handle the Office 365 Groups and Microsoft Teams governance toolkit. The next article cover the governance part of our Groups Governance Toolkit.Imagine your company policy requires at least 2 owners per Office 365 Group or per Microsoft Team. In this part, we want to monitor all groups that are ownerless (orphaned), or do not comply with our organization's policies. The IT department shall get the information of all groups and teams where there are no owners or not enough owners and the possibility to fix that. Read below how this can be accomplished.

Groups Governance Toolkit Part 3-Develop Azure Functions

After the introduction of the Office 365 Groups and Microsoft Teams Governance Toolkit and with the necessary requirements we are now looking into Azure Functions. In our group and team provisioning scenario, we need a little code for provisioning of an Office 365 group and a Microsoft team. Serverless computing with an Azure Function provides the optimal solution for that. Follow these steps to create the function we need for our workflow.

Groups Governance Toolkit Part 2-Provisioning requirements

In part 1 of this series we described the scenario for our Office 365 groups governance toolkit. In this part we will setup a workflow for the Office 365 and Microsoft Teams provisioning. Workflows help to follow specific processes for a successful collaboration.
Offering self-services for users is a key to reduce workloads on the IT department and to allow users to cover their requirements quickly while the organization's policies are enforced during the process. A frequently asked request is how to provision a new Microsoft Team in Office 365 in a secure and monitored way. See how this can be implemented here.
To allow an app to create a Microsoft group or team programmatically in a workflow, we will use the Microsoft Graph API, Azure Functions and Flow or Logic Apps. With these technologies, we can create powerful workflows to offer a self-service for users to create a team when needed, approved by the manager and being provisioned with all the necessary properties and permissions.

Join us at SharePoint Conference 2019!

If you are working with Microsoft SharePoint, 2019 will be a great year! First of all, because SharePoint Server 2019 has been announced, and because SharePoint Conference North America 2019 will take place in May in Fabulous Las Vegas (again). We from atwork will be part of the conference and we are looking forward to it. The event registration is already open and there are reduced price packages available. Additionally, find a $50 discount code here!