Close Menu
Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    Facebook X (Twitter) Instagram
    Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    • Home
    • Intune
    • Windows
      • Modern Workplace
    • macOS
    • Android
    • iOS
    • Automation
      • Logic Apps
      • Intune Monitoring
      • GitHub
    • Security
      • Passwordless
      • Security
    • Speaking
    • About me
    Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    Home»Intune»Build your own Windows 365 request approval flow
    Intune

    Build your own Windows 365 request approval flow

    Peter KlapwijkBy Peter KlapwijkMarch 16, 2025Updated:April 13, 202511 Mins Read

    Today, I share a blog post on creating an approval flow to process user requests for a Windows 365 cloud PC. Such a flow allows an end-user to request a cloud PC, after which the user’s manager needs to approve or deny the request. When the request is approved, the cloud PC is automatically provisioned. This saves the IT admin time manually assigning a license/ cloud PC.

    The solution is short

    The solution consists of several parts. The end-user can enter a new request by filling in a form. The information from this form is stored on a SharePoint List. An Azure Logic Apps flow checks every few minutes if a new item is created on the SP List. If a new item is created, the flow starts to run and queries Microsoft Graph for some user information and the user`s manager.

    A Teams adaptive card is sent to the manager that waits for a response from the manager. The manager can approve or deny the request via the Teams client. When the request is approved, the user is added to an Entra ID group to which a Windows 365 license is assigned. As last the user is informed via a Teams message if the request has been approved or denied.

    I will soon publish a template for easy deployment of the flow to my GitHub repo.

    Requirements

    We have some requirements that need to be in place before we can use our Logic Apps flow.

    We need to have the license assignment in place, which means Entra ID groups are assigned to the proper Windows 365 licenses. Besides that, we need to have provisioning policies in place and Entra ID groups assigned to the policies.

    In this example, I have two different Windows 365 licenses, which the users can request in three different regions. Meaning I have 6 provisions policies and related Entra ID group.

    As described, a form stores the requests in a SharePoint List, but besides that, I also store information on these 6 Entra ID groups in a SharePoint List. A requirement is to have those SharePoint Lists, but also a (service) account with access to those lists.

    We use Microsoft Graph calls to query Microsoft Graph for information on the user and the manager and also add the user to a group. Authentication for this is done with a managed identity. As you can read in the documentation, we have the option to use a system-assigned and user-assigned managed identity. In my case, I use a system-assigned MI, as that is considered the most secure. 

    This Managed Identity needs to have (application) permissions to execute all the Graph calls we make.
    This is the application permission needed for our flow;
    User.Read.All
    GroupMember.ReadWrite.All

    As last, we need to have a (service) account with a Teams license, to send the approval message to the manager and to send a message to the end-user.

    Setting up the SharePoint Lists

    As described I make use of two SharePoint Lists. The List to which the Form writes it’s information is very basic. I hide the default Title column and add two new (required) columns: Geography and Performance Type. Both columns are of type choice and contain the choices the users have.

    Directly from a SP List it’s easy to create a Form by just clicking on the Forms button.

    From the pop-up windows select New form.
    Uncheck Title and if needed add a description under selection boxes.

    The second list contains information of the different Entra ID groups to which licenses and provisioning policies are assigned. I have three columns of type single line of text. Location and Type (which describes the location and type of the W365 cloud PC), Entra Group Name and Entra Group Object ID.

    In this list, as an admin you enter all the related information.

    Setting up the flow

    When we have our requirements in place, we can start building the Azure Logic Apps flow.

    Sign in to the Azure portal and open the Logic Apps service. Create a Logic App of type Consumption.
    We need to select a subscription, resource group, and region, and enter the name of the flow before we can create the Logic Apps flow.

    When the flow is created, click on the name of the flow at the top of the screen, and open the Identity section. On the System assigned tab, set the switch to On and confirm this by selecting Yes.

    Make sure to assign the application permissions to the system-assigned manager identity.

    Browse to the Overview tab and click on Edit. 
    The first thing we need to add to the flow is a Trigger. Click on Add a trigger and search for SharePoint. Select the trigger When an item is created.

    First sign in with your service account with access to the SP List.

    Next, select the Site Address where the SP List is located and select the List Name. 
    In case nothing is shown in the list, click on Enter custom value and paste the needed information. 

    Click on How often do you want to check for items. Here we select how often the flow checks for new items. It is up to you to configure this to your needs.

    After the trigger, we add our first action by clicking on the plus button. We add an HTTP action with which we can query Microsoft Graph for the user’s information, like the User Principal Name.

    Select GET as Method.
    Next, select Authentication under Advanced parameters.
    As Authentication type select Managed identity.
    Select System-assigned managed identity from the list.
    And add https://graph.microsoft.com as Audience.
    Enter below URI:

    https://graph.microsoft.com/v1.0/users/[EMAIL]?$select=id,displayName,mail,userPrincipalName

    We need to replace [EMAIL] with information from the trigger. The trigger pulls in some data related to the SharePoint item, including who created it and the creator’s email. Via Dynamic content we can add this information in the URI. Dynamic content is added by clicking on the lightning button, after which we can search for content.
    Search for email and select Created by Email.

    This is the URI after adding the dynamic content item.

    Next, we need to add a Parse JSON action, which is a Data operations action. We parse the output of the HTTP action, to be able to use the values later on in the flow.

    Add the Parse JSON action to the flow.
    In the Content field, we add Body, which is found as dynamic content of the HTTP action.


    We don’t have to write the schema ourselves, we can generate it by adding a sample payload. We can get this example payload, by running the current flow and grabbing the output from the HTTP action.

    Or run the same query in Microsoft grab explorer to retrieve the same output.

    Select Use sample payload on the Parse JSON action and paste the information.

    And we have configured the Parse JSON action.

    We add a second HTTP Action to the flow, this time to query for the manager of the user.

    Select GET as Method.
    Next, select Authentication under Advanced parameters.
    As Authentication type select Managed identity.
    Select System-assigned managed identity from the list.
    And add https://graph.microsoft.com as Audience.
    Enter below URI:

    https://graph.microsoft.com/v1.0/users/[EMAIL]/manager?$select=id,displayName,mail,userPrincipalName

    Replace [EMAIL] again with the Created by email dynamic content.

    Again, the HTTP action is followed by a Parse JSON action.

    The next step is to add an action to send the Teams adaptive card. Let’s first have a look at how we can create such an adaptive card with the adaptive card designer.

    On this website, we can create a design for our adaptive card.

    We need to select the host app (1) which is Microsoft Teams.
    We can drag different input fields (2) into the designer field (3), like Input.text fields.
    By selecting such a field, we can add text into the field (4).
    We can add a title and several lines of information.

    Under the text fields, we add an Input.ChoiceSet field. With that field, we allow the manager to make a choice of approve or deny.
    We need to enter an Id (1), add a Label (2) and enter a Placeholder (3) in the configuration of the ChoiceSet field.

    Besides that, I want the field to be required, thus I select Required (1).
    I enter an Error message (2) which shows up in case an error occurs when submitting the info. And as last I fill in the Choices (3). I enter Approve and Deny (twice). One to show in the Adaptive Card as an option in the list, and the second time it’s the info sent back to the Logic Apps flow.

    Now we need to select the whole adaptive card, click Add an action and select Action.Submit.

    When we select preview mode, we can see how the card looks like.

    Copy all the information from the card payload editor field, which we need in the flow.

    In the flow, add a Post adaptive card and wait for a response action.

    We select Flow bot under Post as and Chat with Flow bot under Post In.
    In the Recipient field, we need to add the variable mail from the manager. This mail item is dynamic content from the second Parse JSON action.

    We paste the designer’s card payload information in the Teams action’s body field. We can complement that information with dynamic content, like the display name of the manager, the requestor, and the requested information about the cloud PC.

    We need to parse the response of the Teams action. The easiest way to do that is running the whole flow, including an approval from a manager. When the response is sent, the flow finishes until the Teams action. Then we can grab the Teams action’s output body to create the Paese JSON schema.

    With the next action, we split up the flow in an approval and deny part, which is done with a Switch action. The responseselectionid in the Teams action contains the outcome of the approval; approve or deny. Add responseselectionid the dynamic content from the last Parse JSON action to the On field of the Switch.

    Under the switch we add two cases, Approve and Deny.

    Enter Approve in the Equals field of the approve case. Enter Deny in the deny case.

    Under the approval case, we add a Get items action, which is a SharePoint action. With this action we will pull in the information from the SharePoint List that contains information of the Entra ID groups. But we only want to retrieve the group information of the group that corresponds to the requested cloud PC, therefore we use a Filter Query in the action.

    Select the Site Address and SharePoint List.
    Enter the following as Filter Query; LocationandType eq ‘ ‘
    Between the quotation marks we add the SharePoint Values from the request, so that it corresponds with the related Entra Group as how it is stored in the SP List.

    Add another HTTP action to the flow.
    Select GET as Method.
    Next, select Authentication under Advanced parameters.
    As Authentication type select Managed identity.
    Select System-assigned managed identity from the list.
    And add https://graph.microsoft.com as Audience.
    Enter below URI:

    https://graph.microsoft.com/v1.0/groups/[ENTRAIDGROUPOBJECTID]/members/$ref

    Replace [ENTRAIDGROUPOBJECTID] with the Group Object ID value retrieved with the Get items action.

    Enter the below in the Body field;

    {
      "@@odata.id": "https://graph.microsoft.com/v1.0/directoryObjects/[BODY ID]"
    }

    Replace [BODY ID] with the body ID from the Parse JSON action that retrieved the requestor information.

    The HTTP action is automatically added to a For each action.

    Next we add a Teams action to the flow to inform the user that the request has been approved. You can select a Post a message Teams action, but also an action to send an adaptive card again.

    In the recipient field, add the requester’s mail and enter information to your needs in the message field.

    Repeat this step under the Deny case.

    The end result

    The end result is that the user is provided with information about the outcome of the Windows 365 request.

    And this all in an automated way so that no IT admin needs to take action when an end user needs a Windows 365 cloud PC.

    You can also implement this automation to inform your end user when the cloud PC is provisioned.

    Thanks for reading! And good luck implementing this solution.

    Automation Entra ID Identity Management Modern Workplace Power Automate user onboarding Windows 365
    Share. Facebook Twitter LinkedIn Email WhatsApp
    Peter Klapwijk
    • Website
    • X (Twitter)
    • LinkedIn

    Peter is a Security (Intune) MVP since 2020 and is working as Modern Workplace Engineer at Wortell in The Netherlands. He has more than 15 years of experience in IT, with a strong focus on Microsoft technologies like Microsoft Intune, Windows, and (low-code) automation.

    Related Posts

    Build your own user onboarding automation – Day 1: enable the account and create a Temporary Access Pass

    February 18, 2025

    Build your own user onboarding automation – Entra ID user account creation

    February 13, 2025

    Microsoft EPM; Run with elevated access is missing from the right-click menu

    September 2, 2024
    Add A Comment
    Leave A Reply Cancel Reply

    Peter Klapwijk

    Hi! Welcome to my blog post.
    I hope you enjoy reading my articles.

    Hit the About Me button to get in contact with me or leave a comment.

    Awards
    Sponsor
    Latest Posts

    Update Windows Defender during Windows Autopilot enrollments

    May 16, 2025

    Hide the “Turn on an ad privacy feature” pop-up in Chrome with Microsoft Intune

    April 19, 2025

    How to set Google as default search provider with Microsoft Intune

    April 18, 2025

    Using Windows Autopilot device preparation with Windows 365 Frontline shared cloud PCs

    April 13, 2025
    follow me
    • Twitter 4.8K
    • LinkedIn 6.1K
    • YouTube
    • Bluesky 1.5K
    Tags
    Administrative Templates Android Automation Autopilot Azure Azure AD Browser Conditional Access Edge EMS Exchange Online Feitian FIDO2 Flow Google Chrome Graph Graph API Identity Management Intune Intune Monitoring iOS KIOSK Logic Apps macOS MEM MEMMonitoring Microsoft 365 Microsoft Edge Microsoft Endpoint Manager Modern Workplace Office 365 OneDrive for Business Outlook Passwordless PowerApps Power Automate Security SharePoint Online Teams Windows Windows 10 Windows10 Windows 11 Windows Autopilot Windows Update
    Copy right

    This information is provided “AS IS” with no warranties, confers no rights and is not supported by the authors, or In The Cloud 24-7.

     

    Copyright © 2025 by In The Cloud 24-7/ Peter Klapwijk. All rights reserved, No part of the information on this web site may be reproduced or posted in any form or by any means without the prior written permission of the publisher.

    Shorthand; Don’t pass off my work as yours, it’s not nice.

    Recent Comments
    • Adam on Get notified on expiring Azure App Registration client secrets
    • Peter Klapwijk on Update Windows Defender during Windows Autopilot enrollments
    • Rob van de Ven on Add a certificate to the Trusted Publishers with Intune without reporting errors
    • Carl on Update Windows Defender during Windows Autopilot enrollments
    • Peter Klapwijk on The next step in a passwordless Windows experience
    most popular

    Application installation issues; Download pending

    October 1, 2024

    Restrict which users can logon into a Windows 10 device with Microsoft Intune

    April 11, 2020

    How to change the Windows 11 language with Intune

    November 11, 2022

    Update Microsoft Edge during Windows Autopilot enrollments

    July 9, 2024
    Peter Klapwijk – In The Cloud 24-7
    X (Twitter) LinkedIn YouTube RSS Bluesky
    © 2025 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.

    Manage Cookie Consent
    To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
    Functional Always active
    The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
    Preferences
    The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
    Statistics
    The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
    Marketing
    The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
    Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
    View preferences
    {title} {title} {title}