I have a web app that allows receptionists to create calendar events on Outlook/Office365. To manage the events I use Microsoft Graph. The app sends the Graph requests under his own identity, because I need it to have no user interaction for logging in, so it uses Client_ID and Client_Secret with administrator rights to do everything. I can create events on the calendars of any user in the organization, which kinda works like creating an event "On behalf of", but there's a problem. When you create an event in someone else's calendar, Outlook will send the invitations as the calendar's owner, and this means that if the owner doesn't have permission to send messages to a mailbox (for example, a room mailbox), the invitation will never arrive. I need it to send the invitations from another user account (the receptionist that creates the event), like Office 365 does when you create an event on a shared calendar. Is that possible? Or is there any workaround to accomplish what I need?
Related
ENVIORNMENT
Outlook Desktop (Office 365);
Exchange Server;
Azure Cloud
INITIAL CONDITIONS
USER_A is USER_B's assistant and manages USER_B's calendar (Outlook Shared Calendar). We would like to track the changes in USER_B's calendar. In Outlook/Exchange speak, USER_A is a delegate of USER_B.
GOAL
When certain Outlook Calendar Items are modified, we'd like to call a Function App which will update a database. The calendar could be a Shared Calendar, but not necessarily a shared Calendar.
USE CASE
USER_B is not logged in, but USER_A creates an appointment in USER_B's calendar.
Even though USER_B is not logged in, we'd like to capture the change made by USER_A and update our database. In other words, a change notification should fire for the shared calendar, even though the owner of that calendar is not logged in.
QUESTION
Does the Function App need "App" level permissions to do this?
Would the code look something like:
POST https://graph.microsoft.com/v1.0/subscriptions
Content-type: application/json
{
"changeType": "created",
"notificationUrl": "https://webhook.azurewebsites.net/api/send/UpdateDataBase",
"resource": "users/{a-user-id}/events",
"expirationDateTime":"2020-10-20T19:23:45.9376913Z",
"clientState": "bigSecret",
"latestSupportedTlsVersion": "v3"
}
In order to get change notification in shared calendars, "Application" level permissions are required.
I found this here How to subscribe calendar event if calendar is given delegated permission using ms-graph api
Is there a way to subscribe to all NEW calendar entries create by all users in my organization? Basically, whenever anyone in my organization creates a meeting invite, my app needs to be notified.
Our app needs this to work for both Exchange Online and On-premise.
Is there a way to subscribe to all NEW calendar entries create by all users in my organization?
No Subscriptions and always in the context of a Mailbox or Mailbox Folder (you need to consider your mailboxes will be spread across different servers in different data-centers)
As a workaround you could create a Transport Rule that catches any Meeting invitations and redirect them to a particular mailbox. Then just subscribe to events on that mailbox.
I would like to open new conversations with users using the Microsoft Bot Builder on the Skype for Business channel. The only information I have is the user id (sip:user#domain.com)
In all the examples I could find, it is needed to save the conversation id/address of a user in a previous conversation to send a new message to this user.
How to create a new conversation as a bot to a user knowing only his id?
Thanks
Like you stated the userId is required to send a message to the user. A new conversation can be created by the framework but ultimately, you can't do anything without the userId and to obtain this the user has to contact your bot first. This is only true for channels like Skype. Other channels like E-mail just use the email address as an id. Skype uses a GUID as the id for their users. This is done so bots can't randomly add themselves to any user on Skype. Source
This doesn't mean you have to necessarily wait for the user to start a conversation. Whenever a user adds a bot to their contact list an event is send to the bot. This is the ContactRelationUpdate event. It warns the bot that a user has added the bot and the bot can then respond accordingly. Once this event is thrown you can obtain the userId from the activity and do whatever you want with it. Source
Hi I am creating an event using service account and added attendees. The response returned correctly but attendees are not getting invite mails. The Service account is not linked (shared) with any google account. Though to login into API console I used my gmail account. Calendar Id was given as Primary. Where the event will get created, on Service account's Calendar or my primary Calendar?. I could not see it on mine Calendar but response returned with Status "Confirmed". I am more interested in invites rather where the original event got created.
Any help would be appreciated !!!
You need to remember that a service account is not you. Think of a service account as a dummy user. It has its own calendar account, drive account and probably a bunch more. When you inserted an event into primary you inserted it into the service accounts primary calendar.
You have a few options.
Share your primary calendar with the service account. Just add it as a user. Find the calendar id in the settings and have the service account insert into that calendar id.
Have the service account share its primary calendar with you by granting you permissions to it. you should then be able to see it on the bottom left hand side of the Google calendar website.
Have the service account invite you to the event on the service accounts Google calendar.
Have the service account create the event with you as an attendee event.insert check the body of the request.
How can I subscribe to a notification that will trigger every time that an appointment has started?
This is not possible, since Exchange does care about appointments in user mailbox. For the store, it's just an element with a bunch of properties.
What you can do is create a service which checks a users mailbox, retrieves all appointments and triggers an event once an appointment has started. Additionally, you can subscribe for notifications so that your application is informed by the Exchange server when an item in the users mailbox changes.