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

Notifications

Announcements

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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard