📢 Read the latest Release Notes to learn what's new on Hunters! 💡

STEP 3: Get a refresh token (o365-audit-logs)

Prev Next

In this process you will use the values retrieved in the previous steps, to generate a refresh token. The refresh token is required when setting up the connection on Hunters.

To generate a refresh token:

  1. Open your terminal and run the following command after replacing the {client_id}, {client_secret} and {authorization_code} variables with the information collected in the previous steps:

  2. curl -X POST \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d "code=AUTHORIZATION_CODE" \
      -d "client_id=CLIENT_ID" \
      -d "client_secret=CLIENT_SECRET" \
      -d "redirect_uri=http://localhost:5110" \
      -d "grant_type=authorization_code" \
      -d "scope=https://manage.office.com/ActivityFeed.Read" \
      https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/token


    An access token and a refresh token will be returned.

  3. Copy and paste both values into a notepad for future use:

    • Access token - use it in the next steps to start subscriptions (if required).

    • Refresh token - use it when setting up the connection on the Hunters platform.