Invite to a meeting
How to invite someone to a Teams meeting with the Microsoft Graph in .NET.
The problem
There are some good samples out there that lets you get started with Microsoft Graph. This is the one I have used: WebApp-OpenIDConnect-DotNet.
Once you got this running (there is some stuff to configure), how do you invite someone to a Teams meeting with the SDK?
The solution
It took a while for me to get this right. First you need to add the permission
Calendars.ReadWrite OnlineMeetings.ReadWrite
both appsettings.json and the API
permission in your application settings in Azure App
Registrations. And then you could use this
code:
Check out this page for which time zones you could use. In my next post I show how you could get the timezone from the user’s settings instead.
Summary
I have played Microsoft Graph a couple of times but always find it a bit complicated to work with. But with the new Microsoft Identity Web and the Microsoft Identity Platform it has become quite easy.
The Graph Explorer is a great place to use if you want to play with the API.