Logo
  • Contact form
  • Events & slides
  • Buy me a snack
πŸ‘‹πŸ»
Using built-in HTTP requests in Power Apps and Automate

Using built-in HTTP requests in Power Apps and Automate

Table of contents

  • General
  • Power Automate samples
  • Office 365 Users
  • Find room resources in the tenant
  • Count all users in tenant
  • Order user response by displayName
  • Filter for users with department XYZ
  • Office 365 Groups
  • Filter all groups by displayName
  • Read all members of a group
  • Read members of a group with expand on the manager property
  • Count all members of a group
  • Office 365 Outlook
  • Check users availability
  • Create event
  • Update event
  • Get event
  • Get mails from a shared mailbox or as a delegate
  • Reading the mail headers
  • Microsoft Teams
  • Send a plain message in a chat
  • Send an adaptive card in a chat
  • SharePoint Online
  • Power Apps samples
  • Read all members of a group
  • Changelog
☝
TL;DR - Most things can be done using built-in actions in Power Automate and Apps. Here are examples where using the free HTTP requests makes sense and helps working with the returned data.

General

All actions that are send with these built-in actions are automatically delegated. This means, that the flow acts in your context and checks if you have permissions to read or write the data you requested. Consider the HTTP request actions as additional options, as you can do most things with the built in actions.

Here is an overview of the endpoints you can use:

Category
Endpoint Url
Links
Users
https://graph.microsoft.com/v1.0/users https://graph.microsoft.com/v1.0/me 2nd segment: messages, mailFolders, events, calendar, calendars, outlook, inferenceClassification
https://learn.microsoft.com/en-us/connectors/office365users/#send-an-http-request
Groups
https://graph.microsoft.com/v1.0/groups
https://learn.microsoft.com/en-us/connectors/office365groups/#send-an-http-request-v2
Teams
https://graph.microsoft.com/v.1.0/teams https://graph.microsoft.com/v.1.0/me/chats https://graph.microsoft.com/v.1.0/users 2nd segment: channels, chats, installedApps, messages, pinnedMessages
https://learn.microsoft.com/en-us/connectors/teams/?tabs=text1%2Cdotnet#send-a-microsoft-graph-http-request
Outlook
https://graph.microsoft.com/v.1.0/me https://graph.microsoft.com/v.1.0/users 2nd segment: messages,mailFolders,events,calendar,calendars,outlook,inferenceClassification
https://learn.microsoft.com/en-us/connectors/office365/#send-an-http-request
πŸ‘‰

Currently, not all oData query parameters are supported. If you need the full range of parameters, you have to use the HTTP premium connector and the Graph API.

🚨

Respect the limits for the Graph API and the respective service connector, for example Teams: https://learn.microsoft.com/en-us/graph/throttling-limits#microsoft-teams-service-limits or here https://learn.microsoft.com/en-us/connectors/teams

🚨

By default, all requests have a response limit of 100 items. If you want more, you can use top=999 to get up to 999 items. This is the max amount. Otherwise, you will have to process the odatanextlink to get more than 999 items.

Power Automate samples

For all requests where you use $orderby, $filter or $count, you have to to use a custom header (paste as is into the parameter)

ConsistencyLevel: eventual

Office 365 Users

Find room resources in the tenant

This is a beta endpoint. https://learn.microsoft.com/en-us/graph/api/user-findrooms?view=graph-rest-beta&tabs=http

Method: GET
Content-Type: application/json
Uri: https://graph.microsoft.com/beta/me/findRooms

Count all users in tenant

Method: GET
Content-Type: application/json
Custom Header 1: ConsistencyLevel: eventual
Uri:https://graph.microsoft.com/v1.0/users/$count

Order user response by displayName

Method: GET
Content-Type: application/json
Custom Header 1: ConsistencyLevel: eventual
Uri:https://graph.microsoft.com/v1.0/users?$orderby=displayName

Filter for users with department XYZ

Also works for jobTitle

Does not work for location or company.

Method: GET
Content-Type: application/json
Custom Header 1: ConsistencyLevel: eventual
Uri: https://graph.microsoft.com/v1.0/users?$select=displayName,companyName,department,mail,id,jobTitle&$filter=Department eq 'IT'

Office 365 Groups

Filter all groups by displayName

Method: GET
Content-Type: application/json
Custom Header 1: ConsistencyLevel: eventual
Uri: https://graph.microsoft.com/v1.0/groups?$filter=displayName eq 'SearchString'

Read all members of a group

Method: GET
Content-Type: application/json
Uri: https://graph.microsoft.com/v1.0/groups/Group-Id/members?$select=displayName,companyName,department,mail,id

//more than 100 members, max. 999
https://graph.microsoft.com/v1.0/groups/Group-Id/members?$select=displayName,companyName,department,mail,id
https://graph.microsoft.com/v1.0/groups/Group-Id/members?$select=displayName,companyName,department,mail,id&$top=999
🚨

If the group has more than 999 members, you have to work with a do until loop and the odata.nextLink property in the response of the http request to gather all members of the group.

Read members of a group with expand on the manager property

Method: GET
Content-Type: application/json
Uri: https://graph.microsoft.com/v1.0/groups/GROUP-ID/members/microsoft.graph.user?$expand=manager($select=employeeId)&$select=displayName,mail,accountEnabled,department,surname,givenName,employeeId,companyName,onPremisesSamAccountName,jobTitle,manager

Count all members of a group

Method: GET
Content-Type: application/json
Custom Header 1: ConsistencyLevel: eventual
Uri: https://graph.microsoft.com/v1.0/groups/group-id/members/$count

Office 365 Outlook

Check users availability

Create event

Update event

Method: POST
Content-Type: application/json
Uri: https://graph.microsoft.com/v1.0/me/events/eventId
Body:

Get event

🚨

Just a note: If you plan on tracking responses for your events and if possible create the events in your default calendar. If you create events in a secondary calendar in your mailbox, the event responses are not tracked and the API will always return the status of β€œnone” instead of accepted or declined. You will however receive an email for the event responses. So you will have to work of those.

Method: GET
Content-Type: application/json
Uri: https://graph.microsoft.com/v1.0/me/chats/CONVERSATION-ID/messages

Get mails from a shared mailbox or as a delegate

GET
https://graph.microsoft.com/v1.0/users/SHARED-MAILBOX-ADDRESS/messages/MESSAGE-ID?

Reading the mail headers

GET
https://graph.microsoft.com/v1.0/me/messages/MESSAGE-ID?$select=internetMessageHeaders

Microsoft Teams

Send a plain message in a chat

icon

If you need to send a large number of messages in a short time, you should use this HTTP request as it has a throughput of 200 messages per second instead of 25 per 300 seconds with the built-in action (At least how I understand the documentation, though I have tested this with 500 messages).

You can use the create chat built-in action to create a new chat, which will give you the conversation-id.

Method: POST
Content-Type: application/json
Uri: https://graph.microsoft.com/v1.0/me/chats/CONVERSATION-ID/messages
Body:
{
  "body": {
     "content": "Hello world"
  }
}

Send an adaptive card in a chat

Adaptive cards can also be send via the graph API. If you have no images in your adaptive card, you can use the code below. If you do have images, you will have to place them as base64 into the hosted contents. You can use a compose action with the expression guid() to get a random GUID string. The number needs to be the same in the body/content and attachments/id.

I recommend using one compose action to set the adaptive card, then another compose action to escape the adaptive card JSON.

SharePoint Online

I have a lot of other blogs where I write about these features. For example:

HTTP request to SharePoint - Files and ItemsHTTP request to SharePoint - Files and ItemsHTTP request to SharePoint - Users, Groups and PermissionsHTTP request to SharePoint - Users, Groups and PermissionsHTTP Request for SharePoint - Site structureHTTP Request for SharePoint - Site structure

Power Apps samples

You can obviously use built-in connectors for the respective connectors, the HTTP requests allow you to change specific things like selecting columns for the response.

Read all members of a group

Power Apps currently does not really understand the response of HTTP requests. Therefore, you have to basically parse the answer. You first have to set the result to variable and from there collect it into a collection.

You can only read a maximum of 999 members per group.

Changelog

Date
Changes
20.07.2025
Added Find room resources in the tenant
19.12.2025
Added info about access to shared mailboxes Added select for internet message headers

Thanks for reading! πŸ’•

Logo

Events & slides

Buy me a snack

Contact form

Data privacy policy

About

This blog is made with β™₯️ on Notion and made public with Super.so. Rocket icon created by RIkas Dzihab - Flaticon.

RedditLinkedIn
Method: POST
Content-Type: application/json
Custom Header 1: Prefer: outlook.timezone="W. Europe Standard Time"
Uri: https://graph.microsoft.com/v1.0/me/calendar/getschedule
Body: 

{
    "Schedules": [
    "Email1","Email2"
    ],
    "StartTime": {
        "dateTime": "2025-08-16T20:00:00.0000000",
        "timeZone": "W. Europe Standard Time"
    },
    "EndTime": {
        "dateTime": "2025-08-16T22:30:00.0000000",
        "timeZone": "W. Europe Standard Time"
    },
    "availabilityViewInterval": "30"
}
Method: POST
Content-Type: application/json
Uri: https://graph.microsoft.com/v1.0/me/calendars/calendarId/events
Body:
{
  "subject": "@{triggerBody()?['text']}",
  "body": {
    "contentType": "HTML",
    "content": "@{triggerBody()?['text_1']}"
  },
  "start": {
      "dateTime": "@{triggerBody()?['text_2']}",
      "timeZone": "W. Europe Standard Time"
  },
  "end": {
      "dateTime": "@{addMinutes(triggerBody()?['text_2'],int(triggerBody()?['number']))}",
      "timeZone": "W. Europe Standard Time"
  },
  "attendees": @{body('Select_-_http_participant_format')},
  "isOnlineMeeting": true,
  "onlineMeetingProvider": "teamsForBusiness"
}
Method: POST
Content-Type: application/json
Uri: https://graph.microsoft.com/v1.0/me/chats/CONVERSATION-ID/messages

Body: 
{
    "subject": null,
    "body": {
        "contentType": "html",
        "content": "<attachment id=\"GUID\"></attachment>"
    },
    "attachments": [{
        "id": "GUID",
        "contentType": "application/vnd.microsoft.card.adaptive",
        "contentUrl": null,
        "content": "ESCAPEDADAPTIVECARDJSON",
        "name": null,
        "thumbnailUrl": null
    }],
    "hostedContents": []
}

Set(
    grpMembers,
    Office365Groups.HttpRequestV2(
        "https://graph.microsoft.com/v1.0/groups/Group-Id/members?$select=displayName,companyName,department,mail,id&$top=999",
        "GET",
        "",
        //Technically the content type does not matter. It is not parsed in any way
        {ContentType: "application/json"}
    )
);
ClearCollect(
    colMembers,
    ForAll(
        Table(grpMembers.value),
        {
            DisplayName: Text(Value.displayName),
            Company:Text(Value.companyName),
            Department: Text(Value.department),
            Mail:Text(Value.mail),
            Id:Text(Value.id)
        }
    )
)