cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LukePWilkins
Helper II
Helper II

Export CSV - Security Group Members

I love Power Automate, but always fall down when it comes to manipulating the outputs and on this occasion exporting to a CSV file.

If I run AzureAD - Get Group Members, I get the following output:

 

{
"statusCode": 200,
"headers": {
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"Strict-Transport-Security": "max-age=31536000",
"request-id": "a15f41fb-8dc4-4d39-9b64-e75b31a24863",
"client-request-id": "a15f41fb-8dc4-4d39-9b62-e75b33a24863",
"x-ms-ags-diagnostic": "{\"ServerInfo\":{\"DataCenter\":\"Australia Southeast\",\"Slice\":\"E\",\"Ring\":\"4\",\"ScaleUnit\":\"002\",\"RoleInstance\":\"ML1PEPF00004AFE\"}}",
"x-ms-resource-unit": "3",
"OData-Version": "4.0",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "false",
"Cache-Control": "no-cache",
"Date": "Mon, 20 Dec 2021 21:22:20 GMT",
"Content-Type": "application/json",
"Content-Length": "52302"
},
"body": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects",
"@odata.nextLink": "https://australia-001.azure-apim.net/apim/azuread/shared-azuread-25567843-72eb-4b47-9eea-130b-094698...",
"value": [
{
"@odata.type": "#microsoft.graph.user",
"id": "6c6f0c15-4548-4a07-aaaa-656fd31234",
"businessPhones": [
"+1234567"
],
"displayName": "Name Name",
"givenName": "Name",
"jobTitle": "PowerAutomate",
"mail": "name.name@name.com",
"mobilePhone": "123456789",
"surname": "Name",
"userPrincipalName": "name.name@name.com"
}

 

I'm unable to pass this to create a CSV table, even if I add a parse JSON file I still am unable to select the individual properties. Please can someone lend assistance in manipulating the data types and get it to a point where I can export as CSV please?

5 REPLIES 5
ekarim2020
Super User
Super User

Try using the Create CSV table action using Dynamic content:

2021-12-20_21-49-30.png

 

Then create the CSV file using the output of the Create CSV table action:

2021-12-20_21-58-41.png

 

Sample runtime output:

2021-12-20_22-01-36.png


Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

LukePWilkins
Helper II
Helper II

Thank you for this! As I posted this thread, I then revisited the flow and saw this option. 

 

If I needed to use the Get User Profile v2 for O365 connector, skipping the Get Group Members flow. What syntax is used to construct the search criteria for users with one particular domain UPN

One method is to use the Filter Array action, filtering on the userPrincipalName property as the example below illustrates:

2021-12-21_21-56-10.png


Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

 Using Search for users and Filter array:

2021-12-21_22-11-18.png


Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

LukePWilkins
Helper II
Helper II

Thank you very much @ekarim2020 , I have it sorted! Appreciate you responding

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,772)