web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

A few API Questions - Pulling Opportunity Stages and Sales Users

(0) ShareShare
ReportReport
Posted on by

Hello all, I'm back with a few more questions!

I was wondering if there was a way to just pull a list of Opportunity Stages from somewhere? I see they appear in the "Opportunity Sales Process" table but that table seems to track each Opportunity separately whereas I am just looking for the list of the different stages like "Quality, Develop, Propose, Close" and their accompanying IDs. I did find documentation for a function called "RetrieveActivePath" which sounds like it's actually supposed to retrieve a list of Stages but I can't find it in the REST Builder under "Execute Function".

As for the Users I was able to pull a full list of Users from the `aadusers` endpoint but I am having trouble finding a way to filter them by if they have access to the Sales section of Dynamics 365. Currently that endpoint lists everyone we have available and I am not seeing any properties that might help me filter here. Or if there is a different endpoint I am supposed to Use for that I am all ears, I saw using the REST Builder that there are quite a few endpoints dealing with Users, one of which is the `systemusers` endpoint but that included ones like "Microsoft Dynamics 365 for Outlook" which I do not want, just normal human Users. I need access to their Id, Email, First/Last Name, Avatar URL, and if they're Active or not if that helps narrow down the API I am missing, or if this is something where a custom query might work best for that I can include in a solution. 

As always thanks for any help you might be able to provide! 

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    In regards to the stages - check the processstage entity.

    In regards to the users after some slicing and dicing I came up with the following FetchXml Query that you can try against systemuser table:

      
        
        
        
        
        
        
          
          
          
          
        
      
    

    Not sure what you meant with Avatar Url though. Seems it's not the OOB field.

  • Community Member Profile Picture
    on at

    Thanks for the response! As for the Process Stage entity, does the system create a brand new Stage entity for every single opportunity? It seems like rather than having just a single reference table with a list of Stages all of them are duplicated many times in that entity table.

    Ah thank you so much for those conditions, they seemed to filter that list down perfectly! :)

    Ah yeah Avatar URL isn't the right word, it's the Photo URL I was looking for. :D

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Those stages aren't created for every single opportunity as far as I remember.

    And if you are talking about the photo - here is the article that can help you with getting the image - learn.microsoft.com/.../image-attributes

    If my reply (or replies) answers your question take a minute and verify the answer. You can do it by clicking "Yes" at the top of the reply (or replies) under the label "Does this answer your question?"

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans