質問

I'm using Modern experience in SharePoint Online.

I would like to output the user information from SharePoint groups as a CSV file for each SharePoint group every day.
Is it possible to create such a Flow?

I am having trouble with how to make it, so I would appreciate it if you could teach me how to do it.

役に立ちましたか?

解決

Here are the steps and a sample Power Automate you can use to suit your need.

  1. Get all the SPO groups (Id, Title) using [Send an HTTP request to SharePoint]
  2. Use [Parse JSON] to convert output (body) from step 1 to easily readable properties
  3. Use [Apply to each] to process each group and then retrieve users for that group by using another [Send an HTTP..]
  4. Use another [Apply to each] within the previous one to process each user
  5. Use [Parse JSON] to convert user object to easily readable properties
  6. Store Group Name, User Title and Email in variables and then append those to an array variable
  7. Create a CSV table using [Create CSV table] action with the data stored in the array variable

enter image description here

Detail 1

enter image description here

Detail 2

enter image description here

Parse JSON Schema for gorups (Id and Title)

{
    "type": "object",
    "properties": {
        "d": {
            "type": "object",
            "properties": {
                "results": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "__metadata": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string"
                                    },
                                    "uri": {
                                        "type": "string"
                                    },
                                    "type": {
                                        "type": "string"
                                    }
                                }
                            },
                            "Id": {
                                "type": "integer"
                            },
                            "Title": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "__metadata",
                            "Id",
                            "Title"
                        ]
                    }
                }
            }
        }
    }
}

Detail 3

enter image description here

Detail 4

enter image description here

Schema used in Parse JSON for each user

{
    "type": "object",
    "properties": {
        "d": {
            "type": "object",
            "properties": {
                "results": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "Title": {
                                "type": "string"
                            },
                            "Email": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "Title",
                            "Email"
                        ]
                    }
                }
            }
        }
    }
}

enter image description here

ライセンス: CC-BY-SA帰属
所属していません sharepoint.stackexchange
scroll top