Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

Creating an appointment from plugin that will have 'Teams' meeting JOIN option

Posted on by
Hello everyone,
 
We have a requirement to Create
- A Teams Meeting
- Or an Offline Meeting (with invite in calendar)
 
in our CRM based on user's choice. Also whoever is the user mentioned as a particular attribute on that record should be the Organizer of that meeting. When team's meeting is selected then JOIN option and URL should accompany the invite.
 
When I create an 'Appointment' from dynamics CRM, it does create proper teams meeting with JOIN option if I select meeting type as 'Teams Meeting'.
However when I try to achieve same thing using
1. Workflow
2. Plugin 
3. Power Automate Flow
 
Each approach has its own issues:
1. Workflow -
a. Teams meeting getting created and reflects in Calendar as well.
b. However cannot add multiple required parties. Only first user gets selected as a required party. Rest users are ignored. I know that we need to create PartyList using Activity Party Entity but not sure how to achieve that using Workflow
c. Setting different user (than the one logged in) as an organizer is an issue here
 
2. Plugin - 
a. Using BookRequest to create a meeting
b. Able to set logged in user easily as an Organizer. May be able to achieve what we want here
d. Event is getting created in Calendar and Teams meeting option is set. However that option is disabled when opened same appointment in Dynamics Activity UI
c. Not creating actual TEAMs meeting. OnlineMeetingID, OnlineMeetingChatID and OnlineMeetingJoinURL parameters stays blank. Mailboxes are set to synchronize Email, Appointments and Tasks and setting is 'Server Side Synchronization'
 
This is our code:
// appointmentEntity advisorParty = new Entity(/activityparty/);advisorParty[/partyid/] = target.GetAttributeValue<EntityReference>(/advisor/); Entity clientParty = new Entity(/activityparty/);clientParty[/partyid/] = new EntityReference(/contact/, new Guid(/xxxxxxxx-f38b-ed11-81ac-xxxxxxxxxxxx/)); // Create the appointment instance.Entity appointment = new Entity(/appointment/){    Attributes = {            {/subject/,/Test Appointment From Plugin/ },            {/description/,/Test Appointment created from Plugin./ },            {/scheduledstart/, new DateTime(2023, 12, 12, 21, 0, 0) },            {/scheduledend/, new DateTime(2023, 12, 12, 22, 0, 0) },            {/statecode/, new OptionSetValue(3) },            {/statuscode/, new OptionSetValue(5) },            {/isonlinemeeting/, true },            {/onlinemeetingtype/, new OptionSetValue(1) },            {/requiredattendees/, new Entity[]{ clientParty } },            {/organizer/, new Entity[]{ advisorParty } }    }}; // Use the Book request message.BookRequest bookRequest = new BookRequest(){    Target = appointment};BookResponse response = (BookResponse)service.Execute(bookRequest);Guid appointmentId = response.ValidationResult.ActivityId;tracer.Trace(/Appointment Id: / + appointmentId);
 
 
3. Power Automate Flow
a. Cannot change organizer to even logged in user. Organizer of the meeting always stays Flow Owner. This is not desirable.
 
 
Also we have tried using Teams Connector and Outlook Connector to achieve same functionality.
Teams connector has same issue as Power Automate Flow. That connector's 'Use Invoker Connection' option never gets enabled. We have raised an issue with Microsoft. However it has been 3 weeks and they have not gotten back to us.
 
Any help is appreciated. We have spent heaps of amount looking for info but there are not enough articles regarding setting up Appointment for teams meeting programmatically.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans