Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

Azure AD:Get Group Members get the department attribute

(0) ShareShare
ReportReport
Posted on by 26

Hi

 

Is it possible to use the Azure AD connector: Get Group Members to retrieve the Department Attribute. I'm trying to get all members from a specific AAD group and there attributes. But noticed the "Department" was missing. Is there a workaround?

  • Expiscornovus Profile Picture
    Expiscornovus 31,118 on at
    Re: Azure AD:Get Group Members get the department attribute

    Hi @MP_Squared,

     

    You can use a Select to retrieve the properties that you want from the members array, which should be nested within the body response.

     

    After that you can loop through every item of the outputs of the Select and create a related item in the list for that. 

     

    Below is another example.

     

    exportusersformgroup.png

     

  • MP_Squared Profile Picture
    MP_Squared 26 on at
    Re: Azure AD:Get Group Members get the department attribute

    @Expiscornovus Thanks for the workaround! Another question, how would I take the data from the HTTP request and write it back to a sharepoint list.  

  • Expiscornovus Profile Picture
    Expiscornovus 31,118 on at
    Re: Azure AD:Get Group Members get the department attribute

    Hi @MP_Squared,

     

    Yes, there is a workaround. You could use a retrieve the group via the Graph API and $expand on members. In the response you should see the department field values as well.

     

    Below is an example with Send an HTTP request from the Office 365 Groups connector.

     

    https://graph.microsoft.com/v1.0/groups/?$filter=displayname eq '@{variables('GroupDisplayName')}'&$expand=members

     

    getdepartment.PNG

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard

Featured topics