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»Automation»Setup a Logic Apps Custom Connector to connect to Microsoft Graph
    Automation

    Setup a Logic Apps Custom Connector to connect to Microsoft Graph

    Peter KlapwijkBy Peter KlapwijkFebruary 16, 2021Updated:February 14, 202515 Mins Read

    As you could have read in my previous post, I have been spending some time lately with Power Automate, Logic Apps and everything related. To connect Power Automate or Logic Apps to Microsoft Graph I used HTTP actions, as we don`t have predefined actions available. But there are reasons to set up a custom connector to connect to Microsoft Graph, instead of using an HTTP action. A reason for this is the lack of support for some Graph API calls for Application permissions. This can be overcome by using a custom connecter as this connector supports Delegated permissions instead.

    In this post I describe how a Custom Connector is setup in Azure. I also show how the App Registration is setup, which we need to use for authentication in the Custom Connector.

    Create an Azure App Registration

    • Sign in to the Azure portal
    • Open the service App Registrations
    • Select New registration
    • Enter a (display) Name for the App Registration
    • Make your choice for the Supported account types (mostly the default option works fine)
    • Click Create

    On the Overview tab, we find the Application (client) ID, which we needed later when we set up our Custom connector.

    • Open the Certificates & Certificates tab
    • Click New client secret
    • Enter a Name for the secret
    • Choose when this secret will expire
    • Click Add

    Note the Value of the client secret in a secure place. The secret will only be shown directly after the creation of the secret and we need it later in the custom connector.

    Browse to the API Permissions tab. On this tab, we add permissions which we need to perform actions using Graph. Which permissions are needed can be found on Microsoft Docs. For example, here is information found related to device actions.

    • Click Add a permissions, to add the required permissions.
    • Select Microsoft Graph
    • Select Delegated permissions
    • Search for the permissions you need to assign
    • Select the required permissions (below is just an example)
    • Click Add permissions
    • Select Grant admin consent for Klapwijk
    • Select Yes

    The App Registration is in-place. During the setup of the Custom Connector, we get a Redirect URL, which we need to add to this App Registration.

    Create a Logic Apps Custom Connector

    After creating the App Registration, we are now ready to set up the custom connector. Open the Logic Apps Custom Connector service in the Azure portal. Yes, this is a separate service and isn`t found under the Logic Apps service itself.

    • Click Create
    • Choose the correct Subscription
    • Choose a Resource group (or create a new resource group)
    • Enter a Custom connector name
    • Choose the Region
    • Click Review + Create
    • When the creation of the connector is finished, open it
    • Click Edit

    As I don`t use, for example Postman to setup my connector, I leave this part default.

    • Upload a connector icon (optional)
    • Enter a Description (optional)
    • As Host enter graph.microsoft.com
    • As base URL enter a forward slash
    • Click Security (on the bottom right corner)
    • Choose OAuth 2.0 as Authentication type
    • Choose Azure Active Directory as Identity Provider
    • Enter the Client ID from the App Registration created earlier
    • Enter the Client Secret
    • The Login URL is pre-filled: https://login.windows.net
    • Enter the Resource URL: https://graph.microsoft.com
    • Click Update connector
    • The Redirect URL is created
    • Copy the URL
    • Switch back to the previously created App Registration
    • Browse to the Authentication tab
    • Click Add a platform
    • Select Web
    • Enter the Redirect URL of the Custom Connector
    • Click Configure

    We now need to define all the actions we want to use in our Logic Apps by using this Custom connector. Below is an example to run a Get query to ‘get the properties and relationships of a device object‘ by using the device ObjectID.

    • Switch back to the Custom Connector
    • Open the Definitions page
    • Click New action
    • Enter a Summary
    • Enter a Description
    • Open an Operation ID
    • Click Import from sample

    Here we need to make a choice for the Verb (Method).
    In the URL box, we enter the URL which we would use when we run the same action (query) by using Graph Explorer. After the forward slash, we put our variable in between brackets.
    Click Import

    After the import, the variable is shown under Path.
    Click Update connector, to finish the creation of the connector.

    It`s always possible to add extra actions to the connector at a later time. If you do, don`t forget to add the required permissions to the App registration.

    How to use the Custom Connector in Logic Apps

    Now let`s see how we can use the new Custom Connector.

    • Create a new Logic App, or open an existing Logic App
    • Add a New action to the flow
    • Choose the Custom tab
    • Choose the Custom Connector
    • Choose the custom action
    • Click Sign in
    • Authenticate

    The custom action is added to the flow. As you can see the variable is shown on the left and reminds us of what variable we need to put in the box.
    Here the ObjectID is added, which I get from a previous action.

    I hope this post is of any help to you.
    Thanks for reading. And if you have any input on this topic, just leave a comment. I`m also happy to learn from you guys (or girls 😉 )!

    Flow Graph Graph API Logic Apps Power Automate PowerApps
    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

    Create an application-based Azure AD group with Logic Apps

    May 9, 2022

    Export Endpoint Analytics Proactive remediation data with Logic Apps

    April 19, 2021

    MEM Monitoring: Get your Windows Autopilot deployment events in a Teams channel with Logic Apps – Part 1

    April 16, 2021
    View 1 Comment

    1 Comment

    1. Ivo on March 10, 2022 14:33

      Nice article. However a custom connector can only use delegeted permissions and not application permissions if you use OAuth 2.0. This means that the logged in user from the Logic App flow should have access to the resource to be accessed from Microsoft Graph.
      So this is not very useful. Using an HTTP request in the flow can use application permissions.

      Reply
    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

    Managing Windows 365 Link devices with Intune

    October 24, 2025

    Hard drive and partitions are not shown while installing Windows

    October 14, 2025

    Intune compliance for Windows 365 Cloud PCs

    September 12, 2025

    Intune connector for Active Directory configuration error

    August 29, 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 Graph Graph API Identity Management Intune Intune Monitoring iOS KIOSK Logic Apps macOS MEM MEMMonitoring Microsoft 365 Microsoft Defender Microsoft Edge Microsoft Endpoint Manager Modern Workplace Office 365 OneDrive for Business Outlook Passwordless PowerApps Power Automate Security SharePoint Online Windows Windows 10 Windows10 Windows 11 Windows 365 Windows Autopilot Windows Update
    Awards
    Sponsor
    Follow me on Twitter
    Tweets by inthecloud_247
    Tags
    Administrative Templates Android Automation Autopilot Azure Azure AD Browser Conditional Access Edge EMS Exchange Online Feitian FIDO2 Flow Graph Graph API Identity Management Intune Intune Monitoring iOS KIOSK Logic Apps macOS MEM MEMMonitoring Microsoft 365 Microsoft Defender Microsoft Edge Microsoft Endpoint Manager Modern Workplace Office 365 OneDrive for Business Outlook Passwordless PowerApps Power Automate Security SharePoint Online Windows Windows 10 Windows10 Windows 11 Windows 365 Windows Autopilot Windows Update
    Archives
    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.

    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
    • Luis on Application installation issues; Download pending
    • AndrewWak on Issues syncing SharePoint Online libraries with OneDrive for Mac
    • Peter Klapwijk on Deploy Microsoft Defender updates in deployment rings
    • Magnus on Deploy Microsoft Defender updates in deployment rings
    • Gertjan Jongeneel on Add an Azure AD group to the local administrators group with Microsoft Intune
    most popular

    Application installation issues; Download pending

    October 1, 2024

    How to change the Windows 11 language with Intune

    November 11, 2022

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

    April 11, 2020

    How I solved a strange Kerberos issue

    December 12, 2024
    Recent Comments
    • Luis on Application installation issues; Download pending
    • AndrewWak on Issues syncing SharePoint Online libraries with OneDrive for Mac
    • Peter Klapwijk on Deploy Microsoft Defender updates in deployment rings
    • Magnus on Deploy Microsoft Defender updates in deployment rings
    • Gertjan Jongeneel on Add an Azure AD group to the local administrators group with Microsoft Intune
    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 © 2023 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.

    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}