Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Retrieve all users from a team using web api

Posted on by

Hi

I have a requirement to retrieve all the users from Teams starting with "Kat" and display them in a dropdown. I am using web api to retrieve the same.
I made three get requests. one for teams(getting teamid's) staring with Kat in team entity. another for getting userid based on teamid from teammembership entity.
And another to get user name from userid we got before.

I need to know is there any way to perform this whole operation using one get request using $expand.Please suggest. Please throw some light if you seen you can optimize my web api calls mentioned above.

Thanks
Goutham

*This post is locked for comments

  • Abdelrhman Hiba Profile Picture
    Abdelrhman Hiba 321 on at
    RE: Retrieve all users from a team using web api

    How can Crete API to Insert, Update and Delete in CRM 365 

    thank you.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Retrieve all users from a team using web api

    Could you please share the solution.

  • Goutham A Profile Picture
    Goutham A on at
    RE: Retrieve all users from a team using web api

    Thanks Joe. That was helpful

  • Suggested answer
    Joe Gill Profile Picture
    Joe Gill on at
    RE: Retrieve all users from a team using web api

    Hi,

    You could do a FetchXML web api call. Example here www.inogic.com/.../execute-fetchxml-using-web-api-in-dynamics-crm-2016

    Joe

  • Goutham A Profile Picture
    Goutham A on at
    RE: Retrieve all users from a team using web api

    Hi All,

    if any one has an idea if we can retrieve all  the users of a particular team in single web api call, please share.

    Thank you

  • Suggested answer
    Alagunellaikumar Profile Picture
    Alagunellaikumar 6,210 on at
    RE: Retrieve all users from a team using web api

    Hi

    Adding to extra point  about expand.

    The Expand option is used to retrieve related entity data as part of a request uri and for Web Api requests it only works when querying a single record.

  • Suggested answer
    Alagunellaikumar Profile Picture
    Alagunellaikumar 6,210 on at
    RE: Retrieve all users from a team using web api

    Hi

    I think it is not possible to get in single query

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans