Configuring Azure Active Directory app registrations for Machine to Machine communication.

preview_player
Показать описание
Foreword: sorry for mispronouncing the acronym "JWT" - I knew the recommended pronounce is "jot", but even so, in my first videos I pronounce it in a way that reminds how Italians pronounce the "BMW" brand. 😊

This tutorial describes how to configure app registrations and use the client credentials flow to obtain access tokens for Machine to Machine (M2M) communication in Azure Active Directory. The tutorial explains how to use the Microsoft Authentication Library (MSAL) for Python, and how to use HTTP POST requests to a token endpoint; it follows a previous one that explained how to configure app registrations to enable interactive sign-in in single-page applications to obtain access tokens to consume APIs protected by JWT Bearer authentication.

This tutorial also describes how to use examples I provided in GitHub, and a Bash script to generate certificates that can be used in Azure Active Directory.

Note: At minute 1:11 I accidentally said "Microsoft Access Library" instead of "Microsoft Authentication Library", it's been a lapsus, shortly after I described the proper name.

Even though this tutorial shows an application for Python, the same principles apply to other programming languages and to other distributions of MSAL.

Contents
(0:00:00) Intro
(0:32:00) Example repository
(0:02:40) Cloning the example repository
(0:04:18) App registration for a Daemon
(0:05:36) Application settings
(0:08:18) HTTP POST requests to the token endpoint
(0:11:30) Starting the example server
(0:13:25) Client credentials flow with secret using MSAL
(0:14:52) Creating certificates using openssl
(0:16:40) Configuring certificates for app registrations
(0:17:40) Client credentials flow with certificate using MSAL
(0:19:35) Assigning Application Roles to app registrations
(0:23:25) Closing

The code of this tutorial is available here:
Рекомендации по теме
Комментарии
Автор

Can you explain further why I would need a sever? I don't quite understand, btw very helpful video!

wilsonrodriguez
Автор

how to add a certificate renewal compnonet to this, say if the machine certificate is renewed how can we automatically update this in Azure?

rahusphere
Автор

Hi, thanks for the demo. Especially the Roles section helped me a lot. Do you know any way to include "groups" claim to the JWT with client_credentials flow?

ylcnky