Print an access token to be used with MS Graph API

az account

  • Manage Azure subscription information.
    Part of `az`, the command-line client for Microsoft Azure.
    More information: <https://learn.microsoft.com/cli/azure/account>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

az account get-access-token --resource-type {{ms-graph}}

click the source code to copy install az account on any operating system with command-not-found.com