azAad - klagan/learning GitHub Wiki

Azure Active Directory

AAD is a collection of identities. It is non-regional.

What is a tenant?

A tenant is a collection of:

  • identities
  • services
    • ms teams
    • ms sharepoint
    • ms exchange
  • applications
    • third party
    • on-prem
    • custom

aad aad

Obtain a token

Resource owner password example

export jwt_uid=[user principal name (upn): [email protected]]
export jwt_pwd=[my password] 
export jwt_client_id=[application id guid] 
export jwt_client_secret=[application secret] 
export jwt_scope=[scope]/.default

clear && \
 echo && \
 curl -s \
 -d "grant_type=password" \
 -d "client_id=$jwt_client_id" \
 -d "client_secret=$jwt_client_secret" \
 -d "username=$jwt_uid" \
 -d "password=$jwt_pwd" \
 -d "scope=$jwt_scope" \
  https://login.microsoftonline.com/[tenant id]/oauth2/v2.0/token \
   | jq -r '.access_token' \
  && echo

dotnet HTTPREPL

source

set header Authorization "bearer <token>"
set header Content-Type application/json
⚠️ **GitHub.com Fallback** ⚠️