Skip to content

Small sample .NET 4.8 application that uses MSAL and Microsoft Graph. Here, sending an email is demonstrated

License

Notifications You must be signed in to change notification settings

dmtrek14/dotnet-desktop-winforms-msgraph

Repository files navigation

Introduction

This is a sample .NET Framework 4.8 WinForms app to demonstrate how to wire-up non-SMTP email with Office365. Microsoft has examples for WPF and UWP, but not WinForms, hence the creation of this small app. I've created it, too, to show that it's possible to use an older .NET Framework 4.8 with Microsoft Graph.

How to Set Up

  1. Register application with Azure
  2. Set the permissions in Azure to the desire scopes. In this case, you'll need to add "Mail.Send" and "Mail.ReadWrite" for Microsoft Graph to allow proper permissions for sending emails and attachments. Scopes will also need to be specified in the application itself (~line 29 in MailInfo.cs in the sample)
  3. Use the ClientId and TenantId from app registration on Azure in local application (Program.cs)
  4. Restore packages

Additional Informational and Documentation Links

About

Small sample .NET 4.8 application that uses MSAL and Microsoft Graph. Here, sending an email is demonstrated

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages