Reputation: 81
IPublicClientApplication publicClientApplication = PublicClientApplicationBuilder
.Create("ClientId")
.WithTenantId("TenantId")
.Build();
UsernamePasswordProvider authProvider = new UsernamePasswordProvider(publicClientApplication);
GraphServiceClient _graphClient = new GraphServiceClient(authProvider);
await _graphClient.Me
.SendMail(message, true)
.Request().WithUsernamePassword("ServiceAccountUser", "ServiceAccountUserPassword")
.PostAsync().ConfigureAwait(false);
Added permission:
Graph SDK: 4
Error: The given key 'Microsoft.Graph.AuthenticationHandlerOption' was not present in the dictionary.
Can someone please help me to understnad this issue?
Upvotes: 0
Views: 84