![resume / curriculum vitae](/img/cv.png)
![twitter](/img/x.png)
Let’s cover how to use Azure Active Directory (for authentication) and JSON Web Tokens (for authorizing) your enterprise users in Go!
By the way this is not your classic How to use Go with JWT (search golang jwt
on Google, or any other search engine for that) this is more focused on using specifically the actual Azure Active Directory
service for getting the JSON Web Token and then using that to authorize your API.
If this is your first time using Azure Active Directory, a few really important things to know:
xyz.onmicrosoft.com
name, you get that by going to Azure Active Directory, it’s on the Overview tab.groupMembershipClaims
with SecurityGroup
, basically this:Security
type), add some users to the groups, make sure you write down those Object IDs, those will be used as parameters for our Go program.Take a look at the existing repository, the important bits are the following: