Skip to main content
Dynamics 365 general forum
Suggested answer

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

editSubscribe (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,934 Super User 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 53,906 Super User 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 UG Leader 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 UG Leader 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

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Sundar…

Industry experts answer burning questions directly from our amazing Community…

Enabling Copilot Case and Conversation…

Agents can easily recap an ongoing chat, transcribe a voice conversation…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 282,978 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,562 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans