Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Appropriate Dynamics 365 API URL to find the system user along with associated contacts

(0) ShareShare
ReportReport
Posted on by 5

I've been looking for an API endpoint in Dynamics365 API which provides us with the SystemUser along with their associated Contacts. Please redirect me to an appropriate documentation. 

For ex. EmailID xyz@abc.com should be the input parameter of the API and this endpoint should return all the contacts associated with it.

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,959 Super User 2024 Season 1 on at
    RE: Appropriate Dynamics 365 API URL to find the system user along with associated contacts

    Hello,

    Please use below endpoint for your requirement -

    org50b8451e.crm8.dynamics.com/.../contacts eq 0 and Microsoft.Dynamics.CRM.EqualUserId(PropertyName='ownerid'))

    Replace instance url with your crm instance url.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,071 Super User 2024 Season 1 on at
    RE: Appropriate Dynamics 365 API URL to find the system user along with associated contacts

    Dynamics can be queried using IOrganizationService or the Web API endpoint, here a docs page regarding Web API:

    https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/overview

    to create the Web API queries you can use my tool Dataverse REST Builder (link in my signature), if you need to use IOrganizationService (usually with the official C# SDK) there are plenty of examples like blog posts and videos on how to use the CrmServiceClient object

  • Dynamics365 API Profile Picture
    Dynamics365 API 5 on at
    RE: Appropriate Dynamics 365 API URL to find the system user along with associated contacts

    Hey Steve,

    I was looking for a API endpoint that would give me the list of active contacts associated with the system user.

    From the UI the page looks like this, although in this case it is empty for other accounts it shows a list of contacts. I was looking for an endpoint to return this same data from API.

    pastedimage1646829646946v2.png

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Appropriate Dynamics 365 API URL to find the system user along with associated contacts

    Hi Dynamics365 API,

    If you think my answer help you, please verity it. Thanks a lot.

    Screenshot-2022_2D00_03_2D00_09-152235.png

    If you have any other doubt related to this issue, feel free to ask.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Appropriate Dynamics 365 API URL to find the system user along with associated contacts

    Hi Dynamics365 API,

    I'm not sure what's their associated Contacts mean, the Contacts  created by the User or the Contacts' owner? But I think $expand could do this. Below this is the URL which gets the users filtered by Email along with the contacts whose owner is him.

    var url = "https://xxxx.crm.dynamics.com/api/data/v9.2/systemusers?$select=fullname&$filter=internalemailaddress eq '"   email_address   "'&$expand=contact_owning_user($select=fullname)";
     

    Reference:

    Retrieve a table row using the Web API (Microsoft Dataverse) - Power Apps | Microsoft Docs

    systemuser EntityType (Microsoft.Dynamics.CRM) | Microsoft Docs

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,187 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,966 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans