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 / How can I query for we...
Power Apps
Unanswered

How can I query for web roles?

(0) ShareShare
ReportReport
Posted on by 24

Hey all, been trying to figure this out for a little bit. I am trying to figure out how can I query for web roles related to current users in the contact table. I have a portal which is not an enhanced data model, and I have 18 or so contacts which a different range of web roles. I have a modal that pops us and allows a user select another user and they can perform an action on behalf of the user they selected. In my modal I want the web roles to appear in a column next to the users so the users can be searched by the web roles if needed. Issue is I dont see a web role table for the non enchanced data model. I do know that there is a relationship between the contact table and web role table which is 

 
adx_webrole_contact
 
Currently my fetch looks like 
 
fetch('/_api/contacts/?$select=firstname,lastname,emailaddress1,_owningbusinessunit_value )
.then(response => {
 
if (!response.ok) {
throw new Error('Network response was not ok: ' + response.statusText);
}
return response.json();
})
.then(data => {
console.log("CONTACT DATA IS", data )
this.users = data.value.map(user => ({
firstName: user.firstname,
lastName: user.lastname,
email: user.emailaddress1,
organization: user["_owningbusinessunit_value@OData.Community.Display.V1.FormattedValue"] || "No Organization",
contactid: user.contactid

}));
this.filteredUsers = this.users;
})
.catch(error => {
console.error('Failed to fetch users:', error);
});

any help is appreciated
Categories:

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 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard