This is part 3 of the series on how to send Emails using Graph API. The first 2 parts focus solely on the configuration in the Microsoft Azure. This article focuses on the actual C# code. You can also send email using Postman (which I will publish separately) but that will also require the configuration settings described in the first 2 articles of this series. Check the first 2 steps below:

First step of this series

Second step of this series

You need to write the following code to get Azure credentials required to make API calls

  • Add the packages Microsoft.Graph and Microsoft.Graph.Auth (This is in preview in .Net Core)
  • Add the following namespaces

The first part of how to Send email using Graph API is here.

You need to follow these steps to assign Office 365 license to your user accessing the App you registered in the last step

  • On the Azure home page, search for Azure Active directory and click on the “Azure Active Directory” link
Azure Active Directory
  • Once you have clicked on the Azure Active Directory, you will land up at the page similar to this

Before writing code to access Graph API and send email, you need to have either your organization’s Azure account access or Microsoft Developer account ( and an azure account linked with Microsoft Developer account.

Please note that you cannot call the Graph API to send email if you only have an individual Azure account. The reason is you need license to access Office 365 from your Azure account. The license cannot be assigned to an individual account.

Please follow along for

Steps to register a New App in Azure

Assign Office 365 license

C# code to call Graph API.

You need to follow these steps to Register a New App in Azure

  • Search…

Advantages of .Net Core

There was increasing demand of software developers and organizations for a cross-platform .Net development environment. To accomplish that, Microsoft was essentially going to have to rewrite significant portions of .NET, ASP.NET, and NET Framework, so this was a perfect opportunity to make additional changes to the platform. Not only providing the advantage of cross-platform environment, .Net Core has several advantages over the traditional .Net environment. Let us get into the details of each advantage .Net Core provides:

1. Open source

.NET Core is truly open source, not just source open. All the code and all of the documentation are all…

Software comes in all types of size and shapes. Every team has different though process, works differently and the outcome of the software depends upon various factors such as client requirement, budget, time, use of available solutions to common problems etc. And if all goes well, the application does what the user expects it to do. But modern software can be complex, which can lead to complex code. And complex code is difficult to work with. What if we could make software easier to work with? What if we could translate complex architectural problems to recognizable patterns?

Just like a…

Here are my 2 cents on it.

First thing to remember is getting your first job in Australia is the toughest thing. Once you have secured your first job, things will be easier for you.

# Points to consider when applying on seek or LinkedIn

  1. Your profile on Seek and LinkedIn need to be accurate and should match with your CV. Make sure you don’t leave any discrepancies. In my career in the software field, in the last 15 years, I have not come across a single recruiter who is forgiving of the mistakes in Cover Letter or CV.
  2. Search…

Jatinder Singh

Learning to write, learning to live.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store