Skip to main content

Notifications

Community site session details

Community site session details

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

How to retrive segment members from CID segments via api

(1) ShareShare
ReportReport
Posted on by 17
Hi, have you ever tested this endpoint to retrieve segment membres from CID?  : {serviceRoot}/data/Customer?select=*&$filter=IsMemberOfSegment('{SegmentName}')&$top=10 from this walkthrough   https://learn.microsoft.com/en-us/dynamics365/customer-insights/data/odata-examples#customer.
 
I tried from this page https://developer.ci.ai.dynamics.com/api-details#api=CustomerInsights however it seems it is not available in the list, Do I need to create my own app to be able to test it out? 
 
 
  • Verified answer
    EQ-28052252-0 Profile Picture
    17 on at
    How to retrive segment members from CID segments via api
    Hi Dengliang Li, thank you for your reply it is super helpful and it is part of the solution to have the correct headers and the code example (thank you so much for that :) ), however,  I was actually looking for the specific operation to test this endpoint [{serviceRoot}/data/Customer?select=*&$filter=IsMemberOfSegment('{SegmentName}')&$top=10 ] and got some extra help to know that I can use the "GetEntityByODataQuery" operation to set that endpoint as the relative path and be able to test it out.
     
     
     
     
    Thanks!
  • Dengliang Li Profile Picture
    Microsoft Employee on at
    How to retrive segment members from CID segments via api
    Hi,
     
    Has the issue been solved?
    Have there been any updates? Please feel free to ask me if you have any questions!
    If it has been resolved, can you mark the response as an answer?
     
  • Suggested answer
    Dengliang Li Profile Picture
    Microsoft Employee on at
    How to retrive segment members from CID segments via api
    Hi,
     
    According to this document, you would first need to enable Allow API Access in the CID instance.
    Work with Customer Insights - Data APIs - Dynamics 365 Customer Insights | Microsoft Learn
     
    Then use ListAllInstancesAPI to get the current instance ID.
     
    After that, you can get the segmentation membership information by building an XMLHTTPRequest.
    The code is below.
     
    Two request headers Ocp-Apim-Subscription-Key and Authorization need to be set. and their values can be found here.
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me .
     
    Best Regards,
    Dengliang Li
     

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Product updates

Dynamics 365 release plans