Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

How to obtain fullname of the participients from activityparties ?

(0) ShareShare
ReportReport
Posted on by

Hello, I have I problem with obtaining fullname of participients of appointment.
I have my own function to send request in C# which based on HttpClient()).

To take my activities list I send request like:

[organisation]/api/data/v9.0/activitypointers $filter=activitytypecode eq 'Appointment' or activitytypecode eq 'Task' .... (I'm taking info about Appointments, Tasks, Phone calls and Emails).

Next I want to take only participients of appointments. So in C# I'm using foreach loop on json response like:

foreach (var singleItem in jsonResponse)
{...}

and inside I'm checking activitytypecode like:

if(singleItem.SelectToken("activitytypecode").ToString() == "Appointment"){

DO SOMETHING

}

If IF function return true I'm sending activity id to /activityparties like:

[organisation]/api/data/v9.0/activityparties?$filter=_activityid_value eq MY_ACTIVITY_ID

in response, I receive a list of participients but only with ID's (and others info but no with fullname etc.)

I could send every participient ID's to /contacts but not every participients are contact, it can be for example lead. There are no info about type of participient (contact,lead) in participients list so I don't know where to send participeint ID's. 

Is there any easier way to retrieve the FULLNAME (or name + secondname) of appointment participants with a specific appointment id ?

  • Community Member Profile Picture
    on at
    RE: How to obtain fullname of the participients from activityparties ?

    Yeah, I found it too and it's works. So if anyone want to take formatted values from Dynamics by C# HttpClient() you just need to add header like below:

    using (HttpClient client = new HttpClient())

           {

               client.BaseAddress = new Uri("[YOUR_ORGANIZATION]dynamics.com");

               client.DefaultRequestHeaders.Add("Authorization", "Bearer " + sessionToken);

               client.DefaultRequestHeaders.Add("Accept", "application/json");

               client.DefaultRequestHeaders.Add("Prefer", "odata.include-annotations=\"OData.Community.Display.V1.FormattedValue\"");

           }

  • Esteban Coto Alfaro Profile Picture
    on at
    RE: How to obtain fullname of the participients from activityparties ?

    Hello, I found this site in which an example is presented that could be of help: promx.net/.../

    Thanks!

    Community Support Team - Esteban

    If this Post helps, then please consider Accept as solution to help the other members find it more quickly.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 82 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans