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 / Calling properties fro...
Power Apps
Answered

Calling properties from Azure Active Directory to filter a Gallery

(0) ShareShare
ReportReport
Posted on by 23

Hello Community!

I need your help, please 🙂

I have a gallery in PowerApps to show active users from the active directory. I have the function that returns all active users, but I need to exclude those who have the property Employee ID <> "Contractor." The formula needs to be fixed. Does anyone have an idea about it?

 

This is the formula:

Filter(Office365Users.DirectReportsV2(User().Email).value, accountEnabled && ('Employee Id' <> "Contractor"))

Here are the screen shoots:

ddl3_0-1703020596559.png

From the Active directory

ddl3_2-1703020898410.png

Thank you so much,

Danie

 

 

 

 

 

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @ddl3 ,

     

    Please call the api to create a collection.

    vxiaochenmsft_0-1703039966779.png

    vxiaochenmsft_1-1703039975948.png

    ClearCollect(Col,Filter(ForAll(Filter(Office365Users.DirectReportsV2(User().Email).value,accountEnabled),With({temp:Office365Users.HttpRequest("https://graph.microsoft.com/v1.0/users/"&id&"?$select=employeeId,displayName,userPrincipalName,id","GET","")},{id:Text(temp.id),employeeId:Text(temp.employeeId),displayName:Text(temp.displayName),userPrincipalName:Text(temp.userPrincipalName)})),employeeId<>"Contractor"))

     

    Best Regards,

    Wearsky

  • ddl3 Profile Picture
    23 on at

    Thank you for your response. Sadly, when I call the Graph explorer it doesn't return the field employeeId. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard