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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

How are Segments and Contacts related - I want to loop though contacts that are part of an segment with power automate

(0) ShareShare
ReportReport
Posted on by 112

Coming form a relational db background, can't figure out how contacts and segments are related. 

I simply want to loop through Contacts that are part of a segment. I am expecting a table that associate contacts to a segment, but have yet to find it.

I am looking for insight into this to be able to complete some flows.

Thanks

Xv

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi HangryMapache,

    You need to perform an unbound action to achieve this:

    pastedimage1653635064204v1.png

    This is a http request sample: you need to change the Segment id in the "Query".(Please remove all the '-' in GUID)

    POST {{OrgUrl}}/api/data/v9.0/msdyncrm_FetchContactsByQuery
    {
        "Query":"(SEGMENT(SEGMENT_CRM_ID_e1fa7fdc5c78ea11a811000d3a8e8fcc)).ORDERBY(fullname ASC).SKIP(0).TAKE(15).SELECT(contactid)",
        "FetchXml":"","OwningBusinessUnit":"0b4b85cc-7f6c-ea11-a811-000d3a54d359",
        "Scope":270100000,
        "TimeZone":null
    }

    Please refer to this doc: https://docs.microsoft.com/en-us/dynamics365/marketing/developer/extend-segments#addremove-contacts-to-static-segments

    Result:

    pastedimage1653635342009v2.png

  • HangryMapache Profile Picture
    112 on at

    Thank you ! That answers my question. Took a long time to find the solution.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 129 Super User 2026 Season 1

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 46 Most Valuable Professional

#3
NeerajPawar Profile Picture

NeerajPawar 41

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans