azAad - klagan/learning GitHub Wiki
AAD is a collection of identities. It is non-regional.
A tenant is a collection of:
- identities
-
services
- ms teams
- ms sharepoint
- ms exchange
-
applications
- third party
- on-prem
- custom

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' \
&& echoset header Authorization "bearer <token>"
set header Content-Type application/json