openapi: 3.0.1
info:
  title: Office 365 - MS Graph API
  description: Works only on `http://localhost...`
  version: "1.0"
servers:
- url: https://graph.microsoft.com/V1.0
paths:
  /users:
    get:
      description: Get all users
      security:
      - ms-oauth:
components:
  securitySchemes:
    ms-oauth:
      type: oauth2
      description: | 
        ## IMPORTANT !!! 
        Works only when client (`this html`) is served from `http://localhost:8080/...` because the registered client has a redirect url pointing to `http://localhost:8080/examples/oauth-receiver.html`

        1. Register an app at https://portal.azure.com/ (this will give you an Application ID / Client ID)
        2. Create some users in MS Active Directory (MS Graph)
        3. Provide permissions to your APP to access MS Graph users 

      x-client-id: 0801ecad-97a5-4bed-bd5e-0528afecc1d6
      flows:
        authorizationCode:
          authorizationUrl: https://login.microsoftonline.com/546ffd36-88d5-494c-b126-57cc823bb5ea/oauth2/v2.0/authorize
          tokenUrl: https://login.microsoftonline.com/546ffd36-88d5-494c-b126-57cc823bb5ea/oauth2/v2.0/token
          scopes:
            https://graph.microsoft.com/User.Read.All: Read logged users data

    