Quantcast
Channel: Chilkat Tech Notes
Viewing all articles
Browse latest Browse all 415

How to Create Microsoft Graph App (in Azure Portal) for Client Credentials Authentication

$
0
0

1) Go to https://portal.azure.com/#home and login to your Microsoft account.

2) Go to Azure Active Directory.

Copy your Tenant ID, you’ll need it later.

3) Click on “App registrations”

4) Click on “+ New registration”

Give it a name and click Register.  Given that the intended authentication is by client credentials, we don’t need a Redirect URI.  Leave that blank.

5) You created an App in Azure.

Copy the Application (client) ID, you’ll need it later.

6) Click on “Add a certificate or secret”.

7) Click on “+ New client secret”

Name it and give it an expiration.  Click Add.

8) Copy the client secret value by clicking the icon that is to the right of the partially shown secret.

Save the secret along with your tenant ID and client ID.  You may not be able to get the secret later.

9) Click on “API permissions.”

10) Click on “+ Add a permission”.

11) Click on the large “Microsoft Graph” box.  It will highlight (darken) as your mouse hovers over it.   Click on it.

12) Click on the “Application permissions” box.

13) Scroll down, expand “Mail” and click on all permissions.  Then click “Add permissions”.

Also add permissions for User:

14) Also add Directory permissions…

15) Also add Files permissions

 

16) Go back to the API permissions screen.  Notice the statuses showing “Not granted for…”

In the next step you’ll Grant admin consent.

17) Important: Click on “Grant admin consent for …” and then click on Yes:

18) OK, now  you should have an App setup where you can use client credentials to List Users as shown in this example: https://www.example-code.com/vb6/microsoft_graph_list_users.asp


Viewing all articles
Browse latest Browse all 415

Trending Articles