Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Using Entra or Office 365 Users as a data source for master contact list

(1) ShareShare
ReportReport
Posted on by 84

Howdy, I'm working on an app that would help me and others out with user management (e.g., adding and deleting users, editing user information, adding them to groups). I'm essentially trying to mimic a system we have on a sunsetting platform. 

 

To start, I created a user list in SharePoint. Then I realized it'd probably be more convenient down the line to have a Dataverse table instead. So I started building my app around that table. Then I came to wonder if I could just connect directly to the list of users using Entra or Office 365 Users as a data source. 

 

Google seems to indicate that it's possible, but most of the posts I see are related to the Azure AD connection. I've tried using both Microsoft Entra ID and Office 365 Users connections without any success. It doesn't seem to be as straightforward as using, for example, "MicrosoftEntraId" as a source. It looks like it maybe needs "MicrosoftEntraID(something in parenthesis)" and maybe even a ".something" before getting it to work. I've tried a little of this and a little of that, again, unsuccessfully. 

 

I've been toying around in Power Apps for about a year now--very learn-as-I-go. I'm wondering if maybe I'm in over my head at this point. But, I'm also wondering if using Entra as a data source is a bad practice. I think it's probably also worth noting that our particular iteration would end up with fewer users with accounts to our site than guest contacts. 

 

Any advice or guidance about how to move forward would be helpful. Thanks!

  • Verified answer
    JWHTX Profile Picture
    84 on at
    Re: Using Entra or Office 365 Users as a data source for master contact list

    Hi Bhawna, I've been meaning to follow up with this, but things have been a little crazy around here lately. I'm still not exactly where I'd like to be with this, but I think I'll end up going with a workaround. I've been poking around, and it looks like the Microsoft Entra ID dataverse table (aaduser table) has most of what I need, so I'll be using it as a data source. 

     

    Regarding your last note about not being able to add all users on a tenant to a gallery, I was able to do it by adding Office365Users.SearchUser() in the items property. That said, the gallery limited me to 100 items. Still, I wanted to mention it for anyone who might have started down the same path I did and runs across this post. 

     

    I appreciate the time and consideration you gave to my post!

  • Bhawna Bansal Profile Picture
    126 on at
    Re: Using Entra or Office 365 Users as a data source for master contact list

    Hi, Unfortunately, tenant wide application is not possible. 

    You can see here all the actions which we can take with the help of this connector.

    https://learn.microsoft.com/en-us/connectors/azuread/#actions

  • JWHTX Profile Picture
    84 on at
    Re: Using Entra or Office 365 Users as a data source for master contact list

    Bhawna, 

     

    I'm able to mimic your example with the group. Is there a way to do this for the whole tenant? I tried using the tenant ID, but it didn't work for me. 

     

    Thanks!

  • JWHTX Profile Picture
    84 on at
    Re: Using Entra or Office 365 Users as a data source for master contact list

    I haven't had a chance to jump back into it yet. I imagine I'll have more questions when I do. Stay tuned!

  • Bhawna Bansal Profile Picture
    126 on at
    Re: Using Entra or Office 365 Users as a data source for master contact list

    Just out of curiously wants to know if it helped you. If yes, then please mark the answer as accepted solution or if not then let me know where are you getting struck.

    Happy to help always 😊

  • JWHTX Profile Picture
    84 on at
    Re: Using Entra or Office 365 Users as a data source for master contact list

    I'm not. I was hoping I'd be able to access it directly. I'll start investigating a collection to see if I can make some headway there. 

  • Verified answer
    Bhawna Bansal Profile Picture
    126 on at
    Re: Using Entra or Office 365 Users as a data source for master contact list

    It is just a connector to fetch the details, are you storing this information in any collection?

     

    For eg.
    in my case I want to fetch all members from Azure Security Group with Object ID : 804bb20d-2845-4493-b30b-06628e418a4xxx

    In application first i used this below command, to list all users

    ClearCollect(
    colUsedTemporarily,
    Office365Groups.ListGroupMembers(
    "804bb20d-2845-4493-b30b-06628e418a4xxx",
    {'$top': 999}
    ).value
    );

     

    and then use this collection to show the gallery

  • JWHTX Profile Picture
    84 on at
    Re: Using Entra or Office 365 Users as a data source for master contact list

    What might the syntax for a gallery look like for that? Typically I'd just add my data source to the Items line and then adjust the labels or whatever within the gallery. Easy enough. 

     

    If I use just "MicrosoftEntraID" in the Items line of the gallery, it doesn't act like it's a data source. 

  • Bhawna Bansal Profile Picture
    126 on at
    Re: Using Entra or Office 365 Users as a data source for master contact list

    Hi, Using Microsoft Entra ID is best in the case where you are having various security groups ( which is assigned with the licenses and other privilege's ) 

    From security groups you can fetch the list of members and can perform various addition and removal operations.

     

    https://learn.microsoft.com/en-us/connectors/azuread/#actions

     

    Thanks and regards,

    Bhawna Bansal

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard