Assign Office 365 license to your Registered App in Microsoft Azure

Jatinder Singh
4 min readOct 12, 2020

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
Azure Active Directory
  • Now, click on the Licenses menu as highlighted above (in the blue rectangle on lower left side).
Azure Active Directory Licenses
  • Click on All products in the left menu.

Please note: You may not see a product listed in the following screen if you have not assigned a license to your user.

All Products License screen
  • If you don’t see any product listed here then click on Try\Buy button above and a screen will slide out from the right where you can click on the Purchase services link. It will redirect you to Microsoft Developer account or your organization’s admin center where you can add a license for Office 365.
  • After adding the required License, head back to the Azure Active Directory page where you need to select the added license and click “Assign” button.
Select the added license and click Assign
  • On the Assign License screen, Click on the Users and Groups section on the top left and select the users you want to assign the license to, from the window that slides open on the right side and click Select button at the bottom right.
Assign License
  • Click Assignment Options and select Office 365 licenses from the right side and click OK button and then click on Assign button
  • Now, you have the required license in your Azure Active Directory. Now, this license needs to be assigned to your user account. Go back to your Azure Active Directory and click on Users on the left menu.
Azure Active Directory
  • Users screen will open where you can search and then click on the user principal name which will redirect you to his profile page.
Users Screen
  • Click on the Licenses on the left menu as shown below and you will be redirected to the following page. Please note down the Object Id as highlighted below. This Object Id will be used in next step to send emails. You can also obtain the User Principal Name or Object Id (which is GUID of user) programmatically but that is out of scope for this article.
User Profile Page on Microsoft Azure
  • If you don’t see any licenses assigned and listed here, click on “+ Assignments” button at the top.
User Licenses
  • Select\Update the required Licenses and then click Save
  • Once saved, you will be redirected back to the Licenses page where you can view the total number of Licenses assigned to this user

That’s it for this step.

Next step is to write the code to access the Graph API and send emails.

Wrap-up

Thanks for reading. Share to give this post some love if you found it helpful.

Jatinder

--

--