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

Notifications

Announcements

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? 
 
 
I have the same question (0)
  • Suggested answer
    Dengliang Li Profile Picture
    Microsoft Employee on at
    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
     
  • Dengliang Li Profile Picture
    Microsoft Employee on at
    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?
     
  • Verified answer
    EQ-28052252-0 Profile Picture
    17 on at
    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!

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

News and Announcements

Season of Giving Solutions is Here!

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
Pallavi Phade Profile Picture

Pallavi Phade 98

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 81 Super User 2025 Season 2

#3
TAHER Mehdi Profile Picture

TAHER Mehdi 58

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans