Hi @Dmitriy Reznik
I tried creating an online meeting using the graph C# SDK and it worked fine. Refer to the sample code:
using Azure.Identity;
using Microsoft.Graph;
var scopes = new[] { "OnlineMeetings.ReadWrite" };
var tenantId = "{tenant id of the azure ad}";
// Value from app registration
var clientId = "{client id}";
// using Azure.Identity;
var options = new TokenCredentialOptions
{
AuthorityHost = AzureAuthorityHosts.AzurePublicCloud
};
var userName = "{user name}";
var password = "{password}";
// https://learn.microsoft.com/dotnet/api/azure.identity.usernamepasswordcredential
var userNamePasswordCredential = new UsernamePasswordCredential(
userName, password, tenantId, clientId, options);
var graphClient = new GraphServiceClient(userNamePasswordCredential, scopes);
var onlineMeeting = new OnlineMeeting
{
StartDateTime = DateTimeOffset.Parse("2023-07-12T21:30:34.2444915+00:00"),
EndDateTime = DateTimeOffset.Parse("2023-07-12T22:00:34.2464912+00:00"),
Subject = "Test Meeting"
};
try
{
await graphClient.Me.OnlineMeetings
.Request()
.AddAsync(onlineMeeting);
}
catch (Exception ex) {
Console.WriteLine(ex);
}
By the way, based on my tests, creating an online meeting in an Azure B2C tenant is not currently supported.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".