web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Office 365 Groups - Li...
Power Automate
Answered

Office 365 Groups - List group members

(0) ShareShare
ReportReport
Posted on by

Hello guys, I am trying to get all the group members of my 25 Office 365 Groups and insert it as rows in SQL. Is there an easy way to get all in one object or is it one by one - 25 pcs of the image below?

nagestiada_1-1714697077194.png

 

Categories:
I have the same question (0)
  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @nagestiada ,

    I recommend that you put all member ’ID‘into an array, and then use ‘Apply to each’ to loop through all ’ID‘ to find the member's information.

    I did a test for your reference.

    In my scenario:

    vyetonggumsft_2-1714698487041.png

     

    [
     {
     "ID": "100001"
     },
     {
     "ID": "100002"
     },
     {
     "ID": "100003"
     },
     {
     "ID": "100004"
     },
     {
     "ID": "100005"
     },
     {
     "ID": "100006"
     }
    ]
    
    items('Apply_to_each')?['ID']

     

    Best Regards,

    Sunshine Gu

  • nagestiada Profile Picture
    504 on at

    I tried to add another column after ID so I can get the actual GID name before I insert into SQL but I am getting an error.

     

    [
     {
     "ID": "100001",
     "GIDName": "Admin"
    
    
     },
     {
     "ID": "100002",
     "GIDName": "User"
     },
     {
     "ID": "100003",
     "GIDName": "Super Admin"
     },
     {
     "ID": "100004",
     "GIDName": "Bot"
     },
     {
     "ID": "100005",
     "GIDName": "Dummy User"
     },
     {
     "ID": "100006",
     "GIDName": "Test User"
     }
    ]

     

     

    The variable 'GroupID' of type 'Array' cannot be initialized or updated with value of type 'String'. The variable 'GroupID' only supports values of types 'Array'.

     

  • Verified answer
    v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @nagestiada ,

    Please check whether the type of your initialized variable is Array type:

    vyetonggumsft_1-1714729276317.png

    Best Regards,

    Sunshine Gu

     

     

  • nagestiada Profile Picture
    504 on at

    @v-yetonggu-msft , Yes it is Array

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard