Skip to main content

1. Configuring an Application in Azure Active Directory

In this session, you will learn how to create an application in Azure Active Directory (AAD) and configure the necessary permissions so that the application can access the user's data.

Before starting to develop the application, you need to create an application in the Azure Active Directory (AAD). For this, go now to the Azure Portal, use your M365 Developer Program account and click on Azure Active Directory.

Now, let's go to the step by step!

Step by Step

  1. Go to Azure Portal and click on Azure Active Directory.

image-01

  1. Click on App Registrations.

image-02

  1. Click on New Registration.

image-03

  1. Fill in the fields as shown below and click on Register.

image-04

  1. Go to Overview and copy:
  • Application (client) ID
  • Directory (tenant) ID

image-05

We will use these values to configure the application in the env.local file.

Configure the Application

  1. Go to Certificates & secrets and click on New client secret.

image-06

  1. Fill the field Description and click on Add.

image-07

  1. Copy the Value of the Client secret.

image-08

Obs.: don't forget to save this value, you will need it later. If you lose it, you will need to create a new one.

  1. Go to API permissions and click on Add a permission.

image-09

  1. Click on Microsoft Graph amd then on Delegated permissions.

image-111.png

  1. Select the following permissions and click on Add permissions.
  • email
  • offline_access
  • openid
  • Presence.Read
  • profile

image-11

image-12

  1. Go to Microsoft Graph again and click on Application permissions.

image-13

  1. Select the following permissions and click on Add permissions.
  • Presence.ReadWrite.All: Allows the app to read all presence information and write activity and availability of all users in the directory without a signed-in user. Presence information includes activity, availability, status note, calendar out-of-office message, time zone and location.

image-14

  1. Click on Grant admin consent for 'your-tenant-name' and click on Yes.

image-15

Congratulations! YEAH! 🎉🎉🎉

You have successfully created an application in Azure Active Directory and configured the necessary permissions so that the application can access the user's data.

Now, let's go to the next session!