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 Apps / Trying to Retrieve Use...
Power Apps
Answered

Trying to Retrieve User Infor and teammembership_association is Always Empty in Canvas App

(0) ShareShare
ReportReport
Posted on by 155
Exactly what the title says.  I have a canvas app and I'm attempting to retrieve the team membership for the current user.  For whatever reason, the team membership and security roles are always blank.  The user has been assigned to teams and security roles.  The admin clearly shows the user as a member of the team in the environment.
 
fxUser = ShowColumns(
    LookUp(
        Users,
        domainname = fxUserEmail
    ),
    User,
    'User Name',
    'Last Name',
    'First Name',
    'Full Name',
    teammembership_association
);
 
This returns blank:
LookUp(Teams,'Team Name' = First(fxUser.teammembership_association).'Team Name').'Team Name'
 
Any advice would be greatly appreciated.
 
Kind regards.
Categories:
I have the same question (0)
  • vipuljain03 Profile Picture
    657 Super User 2025 Season 2 on at
    The Users data source in Power Apps often doesn't automatically expand related tables like teammembership_association. It retrieves the basic user information, but the related team memberships are fetched separately.
     
    Solution:
    Expand the teammembership_association column in your Lookup function - Use Expand within your Lookup to explicitly include the related team membership data.
    fxUser = ShowColumns(
        LookUp(
            Users,
            domainname = fxUserEmail,
            {Expand: "teammembership_association"} // Key addition: Expand the related table
        ),
        User,
        'User Name',
        'Last Name',
        'First Name',
        'Full Name',
        teammembership_association
    );
    
    // Now this should work:
    LookUp(Teams,'Team Name' = First(fxUser.teammembership_association).'Team Name').'Team Name'
     
    It tells Power Apps to retrieve the related team membership data along with the user information.
     
    ---------------------------------------------
    If this reply helped you, please mark this reply as suggested answer ✔️ and give it a like to help others in the community find the answer too!
     
    Thanks,
    Vipul
  • Verified answer
    dallenap Profile Picture
    155 on at
    That code does not work either.  The ShowColumns throws an error message that the specified columns don't exist.
    fxUser = ShowColumns(
        LookUp(
            Users,
            domainname = fxUserEmail,
            {Expand: "teammembership_association"} // Key addition: Expand the related table
        ),
        User,
        'User Name',
        'Last Name',
        'First Name',
        'Full Name',
        teammembership_association
    );
     
    Also, I cannot find any documentation on the "Expand" in a LookUp.  Where does one find this?
     
    This, however, does appear to work:
    fxIsInTestTeam = CountRows(
            Filter(
                ShowColumns(
                    LookUp(
                        Users,
                        'User Name' = fxCurrentUser.userPrincipalName
                    ).'Teams (teammembership_association)',
                    'Team Name'
                ),
                "Test Team" in name
            )
        ) > 0
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Never seen Expand in Lookup only in Microsoft Graph. Your new approach is the correct approach.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard