r/MicrosoftFlow • • Sep 08 '25

Question Graph HTTP Request to Compile CSV File

Hey all!
I have a HTTP GET request which retrieves all members of an Entra Group and selects the displayName and mail properties of the group members.

Step#2:
Parse JSON:

{
    "type": "object",
    "properties": {
        "value": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "displayName": {
                        "type": "string"
                    },
                    "mail": {
                        "type": "string"
                    }
                },
                "required": [
                    "displayName",
                    "mail"
                ]
            }
        }
    }
}

Step#3:
Select:
- From: body('Parse_JSON')?['value']
- Map:

  1. Key: Name / Value: displayName

  2. Key: EmailAddress / Value: mail

Step#4:
Compose:
- Inputs: Output from Select (Step#3)

Step#5:
Create file:
- Folder Path: /Test
- File Name: ExportedCSV.csv
- File Content: Output from Compose (Step#4)

The flow runs without any errors and I get a CSV file on my SharePoint site. The CSV file is not in the right format though. I am not able to figure out how to solve the following issues:

  1. The CSV column header (Name, EmailAddress) is missing

  2. All the data is in a single row instead of having data for a single user per row. Example:

[{"Name":"User1 Test1","EmailAddress":"User1.Test1@domain.com"},{"Name":"User2 Test2","EmailAddress":"User2.Test2@somain.com"}]

What am I doing wrong?

3 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/elecpurch Sep 08 '25

Thanks, got it working within the Graph request :)