Application Register

To use Microsoft Graph API an application needs creating.

Sign in to the https://portal.azure.com/ using either a work or school account or a personal Microsoft account.

If your account gives you access to more than one tenant, select your account in the top right corner, and set your portal session to the Azure AD tenant that you want.

In the left-hand navigation pane, select the Azure Active Directory service, and then select App registrations > New registration.

When the Register an application page appears, enter your application's registration information:

Name - Enter a meaningful application name that will be displayed to users of the app.

Supported account types - Select which accounts you would like your application to support.

Enter you desired redirect url. This is the url your application will use to connect to Graph API.

Next click Register on the next page take a note of the Application (client) ID.

Add the following to your .env file, change the domain to match your own.

MSGRAPH_CLIENT_ID=
MSGRAPH_SECRET_ID=
MSGRAPH_TENANT_ID=
MSGRAPH_OAUTH_URL=http://domain.com/msgraph/oauth
MSGRAPH_LANDING_URL=http://domain.com/msgraph

Add the client id to the .env file.

Next click Certificate & Secrets and click new client secret

Enter a description and expiration option. Copy secret to .env

Now go to API Permissions. click add permission.

First, select the group type followed by the permission. For instance, when working with emails select the exchange group.

 

Support my work by donating with PayPal.

Subscribe to my newsletter

Subscribe and get my books and product announcements.

© 2009 - 2021 DC Blog. All code MIT license. All rights reserved.