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 Apps / Store Selected Azure A...
Power Apps
Answered

Store Selected Azure AD group members to a SharePoint list column

(0) ShareShare
ReportReport
Posted on by 102

I have dropdown that selects an Azure AD group based on a condition.

The members of the group are already stores in a variable using the code below.

Set(varL2opgcUsermembers, AzureAD.GetGroupMembers("b59ff3f6-31f7-45cd-bd1b-142e36dd3cb2").value);

I have a person type column in sharepoint (Allow multiple selection is enabled for this column).

When submitting the form, I want to store the members from the above variable to this column with display names of the members.

How can i achieve this?

Thanks in advance

 

Categories:
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @muzzamal ,

     

    I made a sample for you.

    vxiaochenmsft_0-1687501419947.png

     

    vxiaochenmsft_1-1687501431228.png

     

    Patch(LIST11,Defaults(LIST11),{Title:"Test",Mult:ForAll(varL2opgcUsermembers,{Claims:"i:0#.f|membership|"&userPrincipalName,Email:"",Department:"",DisplayName:"",JobTitle:"",Picture:""})})

    vxiaochenmsft_2-1687501455880.png

     

    Best Regards,

    Wearsky

  • muzzamal Profile Picture
    102 on at

    Thank you so much ... but the submit button still shows an error. 
    Actually, I have several fields in the form so I disabled the formsubmit(form) before using the patch function. 
    is this causing the problem?

  • muzzamal Profile Picture
    102 on at

    it worked. 
    Final code that worked is below:

    Patch(TestList, // sharepoint list
    Defaults(TestList), // sharepoint list
    {Title:"Test",
    GroupMembers: //sharepoint column name
    ForAll(
    varGroupMembers, //variable or collection where member are stored
    {Claims:"c:0t.c|membership|"& userPrincipalName,
    Email:"",
    Department:"",
    DisplayName:"",
    JobTitle:"",
    Picture:""})});

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard