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 / Saving Azure AD group ...
Power Apps
Unanswered

Saving Azure AD group name to a person type column in SharePoint list

(0) ShareShare
ReportReport
Posted on by 102

Hi,
Need your help to fix another issue.
I have two person type fields in a sharepoint list column.
In the Power Apps, In a form (new mode), for one field, user searches for a person and selects the required person.
In the other field, I have a few Azure AD groups, the group is selected based on the amount from another field. e.g if amount is <500, select a Azure AD group, if amount is >8888 select a different Azure AD group. When submitting the form, all the data is stored in the SharePoint list columns,
The first person field's selected person is also stored in the column, but the second person field where the group is selected based on a condition, the group name is not saved in the list column.
Both fields use different person-type columns and I have enabled "allow groups selection" for the second person field. 
The code for 2nd person field is:

 

DefaultSelectedItems = 

If(
Value(inputPOAmount.Text) <= 499 &&
L2ApprovalStatusInput.Selected.Value = "Required",
{Value: AzureAD.GetGroup("44b25e85-6258-4b47-a8c4-a10ae296b8cc").displayName},

Value(inputPOAmount.Text) >= 500 &&
Value(inputPOAmount.Text) <= 9999 &&
L2ApprovalStatusInput.Selected.Value = "Required",
{Value: AzureAD.GetGroup("44b25e85-6258-4b47-a8c4-a10ae296b8cc").displayName}
)

 


Any idea why the second person field's selected group is not saved in the column?

Thanks in advance

Categories:
I have the same question (0)
  • MarcelLehmann Profile Picture
    378 on at

    Your current code sets the group based on its display name only. However, it may be that SharePoint is not able to correctly identify the group just by the display name alone. The SharePoint person/group field uses a Claims-based identity to identify users and groups, and this claims identity is a unique combination of identifiers for the user or group.

     

    A typical claims-based identifier for a group might look like this: c:0t.c|tenant|<GUID of the group>.

  • muzzamal Profile Picture
    102 on at

    Thanks for the details. So how should I save this value in the column? I tried using the ID as well but it is not saving the group based on the condition.   
    c:0t.c|tenant|<GUID of the group>
    Can you provide some more details on this please. 
    Thanks

  • muzzamal Profile Picture
    102 on at

    Hello,

    based on your suggestion, I tried the following code but it is still not working.

     

    DefaultSelectedItems = 

    If(
    Value(inputPOAmount.Text) <= 499 &&
    L2ApprovalStatusInput.Selected.Value = "Required",
    {displayName:"c:0t.c|tenant|" & AzureAD.GetGroup("44b25e85-6258-4b47-a8c4-a10ae296b8cc").displayName},

    Value(inputPOAmount.Text) >= 500 &&
    Value(inputPOAmount.Text) <= 9999 &&
    L2ApprovalStatusInput.Selected.Value = "Required",
    {displayName:"c:0t.c|tenant|" & AzureAD.GetGroup("44b25e85-6258-4b47-a8c4-a10ae278b8cd").displayName},
    )

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard