Create Exchange Meeting Programmatically - exchange-server

Is it possible to create a meeting or appointment on someone else's Exchange 2010 account, without them needing to accept the meeting? Ideally, we want to have a delegate account, or similar strategy, to place appointments/meetings onto people's calendars. We want to bypass the normal request/accept model, and force these meetings into the calendar.
I looked at CreateItem() in the Exchange 2010 documentation, but it is unclear as to what happens once the method is executed. Does the user receive a normal invitation? We don't want that. We want a model where our system has full control over the users' calendars, without them receiving a traditional meeting invitation, and with automatic acceptance. I would prefer not to have to use VBA hacks or plugins, also.

I think it's possible in case of usage ApplicationImpersonation (the usage of ImpersonatedUserId). It 's important that you have to configure the Exchange first. Then you can set NetworkCredential use ImpersonatedUserId to direct access to the destination calender. See here for more information and the code example.

What I would do is grab a copy of MFCMapi (mfcmapi.codeplex.com), and then create a meeting request in a traditional way and send it to a couple mailboxes. Accept it in a couple, mark tentative in a couple, etc.
Take a look at the resultant calendar item created in the invitee mailbox. I expect you should be able to create the appointment and then set the necesary MAPI properties to make it appear as accepted. You can set the arbitrary properties with EWS, it's just going to take a bit of digging to figure out which ones to set. MFC Mapi is a good tool for that.
On the organizer side, you'll need to make some tweaks so it looks like everyone accepted.

Related

How to create a custom notification in Dynamics

I am looking in to creating a notification function in Dynamics 365, and to find the best solution, I have began with searching for the possibilities (Javascript/C#/All others). Example: Sending a user a notification that a new lead is created.
Edit:It should be generic and easy to add a new notification. So maybe it should be a workflow step, or connected to an entity.
Email notification is already integrated in Dynamics 365
Microsoft Graph has a Notification possibility (Only in Beta)
https://developer.microsoft.com/en-us/graph/graph-explorer#
Create a custom entity which. And on dashboard add a Web Resource (Javascript) that looks through the entity to find if there are any Records on the current user. If so make a popup.
Use Chrome extension to notify user.
(Example: https://community.dynamics.com/crm/b/bruce365usingdynamics/archive/2017/11/02/announcing-365-notify)
Is there any other possibility you know of?
Or do you have any experience with any of these. What one should go for or not.
Your best bet is Dashboard with Posts in Timeline/social pane. This just need couple of configurations like Post rule, Timeline embedding in Dashboard & user training.
Activity feeds
Activity Timeline
If not, timely workflow or MS Flow to send a digest notification.
I would say if you wish to go code less solution then use Workflow
and place trigger as you wish. Send an Email to Either team or
particular user from this workflow. Just set regarding in Email as
Account or Contact or any entity from which you have an Trigger. By
this way You can see all these notification in your Social pane
timeline as well.
If you need some custom logic, Use plugin but in turn call a
workflow which will be onDemand workflow and this will only be used
to send Email.
There can be different Ideas as well. But we have this in place on one of our productive system and it fulfilles requirement of Notification very well.
Since you specifically want to interact with users within the CRM system, there are a number of simple approaches:
Task Queue (Passive) -
Create task records within CRM (these can also sync to Outlook if you want to get fancy). Users review a queue containing all of their tasks. You can similarly assign tasks to teams of users. I recommend this approach for CRM oriented users who have a number of different tasks.
View/Report/Dashboard (Passive) -
Create views of records requiring action. Users then review these views on a regular basis. I recommend this approach for non-time sensitive tasks, and tasks executed in bulk across many records.
Email (Active) -
Create a workflow with a Send Email step. This is easy to do but could generate a lot of emails which the users may then ignore. I only recommend this approach for rare notifications, or those requiring urgent action.
Emailed Reports (Active) -
A hybrid of the second and third approaches, there are third party solutions that will email view results to users on a scheduled basis. This would be my recommendation if you want an active approach without spamming users constantly. These are easy to install and configure and entail a small cost.
In addition to the many viable options offered above (a few of which I was unaware), if the user's daily responsibilities include working with Leads, you might want to keep it super simple - create a My New Leads view and instruct them to check it throughout the day. You could even place this view on a dashboard, making your option 3 redundant.
If the user rarely needs to concern themselves with Leads, the need for a notification strengthens. Assuming that the Lead volume will not flood their inbox, in the interest of simplicity you could start with a workflow email notification.

How can I add appointment id/data to the link appended to the body of this appointment in Microsoft Exchange?

Just like in the title. I would like users using Outlook to be able to click a link in the appointment which will redirect them to the site with additional data about this meeting. This link should be available in a few seconds after creating this appointment, best immidiately. The link may contain either id to this meeting in Exchange or date, time and room.
Is it possible by using transport rules? I couldn't find anything relevant.
Second way to achieve it may be a service which will scan appointments and append relevant link, but it should work every few seconds and be fully reliable.
Any other way? I can't see anything in message/appointment headers :/
I would like to support Exchange versions from 2010 up to Online.

Microsoft Exchange Meeting Master Copy

I have a custom application with its own database and a connection to exchange through EWS. Part of this application is a meeting tool which allows users to import exchange meetings and auto invite the other users which also use my application. As part of this tool I need to keep my meetings up to date with exchange, basically maintaining a centralized meeting storage. I can't simply store the user's exchange credentials due to security concerns and I also cannot customize the EWS server in any significant way (ie I cannot add Delegate Access).
The problem is that I am currently simply forcing all users to login to EWS whenever the go to view a meeting's details and it will query EWS to get the details using that user's EWS credentials and access their copy of the meeting. The problem is that there is no guarantee that any user has the same meeting details as any other user. As is partially explained here. Is there any way I can force the EWS FindItem call to only use the meeting's public (master) properties? i.e. Whatever version of the meeting the organizer has sent out/updated. I just need all users to return the same details when they query for the same meeting.
One solution I've considered is adding a 'bot' user whenever a meeting is imported into my application, and then just always using that bot's version of the meeting. However, I would really prefer to do something more 'under the hood' that doesn't require this extraneous user.
Is there any way I can force the EWS FindItem call to only use the meeting's public (master) properties
No FindItem will only every return you information about what is in the Folder your trying to access. You might want to consider using GetUserAvailiblity to check the organiser https://msdn.microsoft.com/en-us/library/aa494212(v=exchg.80).aspx would be the closest. I would say to make your application work correctly is you need an Service account that has been given at least read access to every users calendar, you can then make a call to get the organiser version of the Appointment which will also contain the user responses. If your using Office365 then the new REST Api does facilitate this in a more secure way eg demon apps https://blogs.msdn.microsoft.com/exchangedev/2015/01/21/building-daemon-or-service-apps-with-office-365-mail-calendar-and-contacts-apis-oauth2-client-credential-flow/

Can an arbitrary email address be used in workflow send email activity

I'm wondering if there is any way to be able to include an arbitrary email address as the To:, From:, CC: or BCC: fields of a send email activity? It appears that they must be contacts in the CRM.
I ask this because I have a requirement to cc a known group email (no actual user associated with the email...something like support#mycompany.com...though it's not a queue at all). I'm concerned that if I create a CRM user for this email, that when I move to production, I'll have to change all the workflows using this email to point to the CRM entity on the production box (assuming GUID is saved with activity).
If an arbitrary email isn't possible, any other suggestions?
I'm not quite sure, if I have unterstood your question right:
You want to create a workflow which contains a send mail activity. You would like to set one of the address fields (To:, From:, CC:) to a plain mail address like 'foo#bar.org'?
It is possible if
you enter the mail address by hand (do not use the field assistant)
you have configured that e-mails with unresolved recipients are allowed to be sent.
See Settings -> Administration -> System Settings -> E-Mail Tab
you don't want to set the e-mail address with another workflow step
To my knowledge, the only way to do this would be to create a custom workflow assembly. This may be more trouble to you than it's worth.
I doubt it. Not without horrible SDK or Custom Workflow Activity machinations, which even then may not work. Unless you have a truly gargantuan number of workflows that must be altered, the manual approach may be the best.
It may be a terrible hack, but you might be able to replace instances of the development environment support account GUID with its production counterpart directly in SQL Server. Not in the SystemUserBase table, but in whatever workflow activities mention the support account as a CC field in an e-mail. But that is scary stuff.
You may also want to take another look at your process; a significant portion of Dynamics CRM is dedicated to handling support issues, and that includes fairly robust e-mail tracking and storage; there probably shouldn't be a need to CC this support mailbox to which you refer.
In summary: All of the options I've listed are terrible. Find a way to avoid them. :-P
I've had this requirement before, and even with workflow activities, there doesn't seem to be a way to handle this (even though CRM will allow it through the UI).
Your instinct is right that if you create a user separately in both environments and then try to move a workflow that references that user between the environments, that the workflow references will have to be updated.
The best solution, to me, would be to go with just creating the contact/user in one environment. But then, create the contact/user in your other environments with the same Guid. You can do this through the API quite easily, or for a no-code solution, there is a Microsoft provided CRM Configuration Data Utility (http://msdn.microsoft.com/en-us/library/dd442453.aspx) that you can use. (Note that the utility will want to migrate all records from the chosen entity, so you might want to export it to a file, edit the resulting file which is just XML, and then import to your target).
This is something that you can do with CRM 2011, CRM 2013, or CRM 2015 if you have a custom entity that is email enabled and then copy the email address from your core entity even if that email address is in a custom text field to it and relate it back via a lookup field. Doing that would require a plugin in Microsoft CRM 2011, but is possible to do with real-time workflows in Microsoft CRM 2013 and Microsoft CRM 2015. This method would allow you to have email addresses associated to the records and available for usage with the CRM workflows to send emails without needing to create an additional user or contact record. This is also handy if you are working with an entity like Incidents that is a core CRM entity and is not email enabled, yet you wish to be able to send emails related to that entity. You could use this method in conjunction with the steps ccellar provided.
I've got a blog post that goes through an example of this here: http://dynamicsuniversity.com/steps-to-send-emails-to-custom-email-address-text-field-from-a-workflow/
You can write custom workflow or you should go for plugin development.
You will get details for it on below blogs.
For custom-workflow
https://msdn.microsoft.com/en-us/library/gg334455.aspx
Blog:-
https://lakshmanindian.wordpress.com/2012/10/14/custom-workflow-activity-in-microsoft-dynamics-crm-2011/
more knowledge on your email sending requirement.
https://social.microsoft.com/Forums/en-US/375f5dad-0382-4112-ab0d-5b42ba235d96/crm-2011-workflow-sending-email-problem?forum=crmdevelopment

Different Unique Ids created using WebDAV and Exchange vs Outlook

I am creating an appointment in Exchange via WebDAV, but the UId created is not the same as if I create the appointment in Outlook. The UId I believe is the same as the GlobalObjectId and should be unique and not change.
The UId if created via WebDAV is:
CD0000008B9511D182D800C04FB1625DDD67374428B4C644A0A359A2586E30B3
The UId if created through Outlook is:
040000008200E00074C5B7101A82E008000000002005332BA3A8CA01000000000000000010000000DD67374428B4C644A0A359A2586E30B3
If I open the appointment created via WebDAV in Outlook and then save it again the UId changes which is annoying (The UId changes to one above beginning with 04).
The second half of the UIds are the same GUID {DD673744-28B4-C644-A0A3-59A2586E30B3} and never change. The document here http://msdn.microsoft.com/en-us/library/cc425490 (EXCHG.80).aspx explains how the GlobalObjectId is constructed. Outlook seems to follow these rules, but Exchange doesn't. I am using Outlook 2007 and Exchange 2007.
There seems to be a myriad of different ids that can be used to identify appointments and I'm just looking for one that stays the same so I can track the appointment over time.
If anyone can help to explain why this UId changes or a way of creating it so it doesn't change it would be much appreciated. My limitations are supporting Exchange 2003 SP2 and Outlook 2003.
Oh yes Id can change, it can depend on the client and the way that you access the items. It a right PITA
I think the link may should help you though , (not knowing excatly what you are doing).
There are mapi proerties that you can use as well but you may have to explain what you are doing a bit more ... are you only doing WebDav ?
How to use WebDav to match dav:href to Outolook Interop href value

Resources