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.