Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleAdd the required role for the application
  1. Navigate the Azure Active Directory blade (you can search for it in the search bar on the top).

  2. On the left-side menu, navigate to the Roles and administrators page.

  3. In the list, search for either the Global Reader or Security Reader role (both are valid) and click on it to select it.

  4. Click the + Add assignments button.

  5. On the right-side modal, use the search bar to find the application you created. Search by either its name (make sure you write the whole name, not only parts of it) or its Client ID in case you cannot find it. Once it appears on the list, select it.

  6. Click the Add button.

  7. To verify that the role has been correctly assigned, execute the following cURL command replacing (or assigning) the $REPORTING_TOKEN shell variable with the token you obtained in the previous instructions:

    Code Block
    $ curl -i -H "Authorization: Bearer $REPORTING_TOKEN" https://reports.office365.com/ecp/ReportingWebService/Reporting.svc

    This response will include the HTTP Response code and headers (note the -i parameter). You should expect to get an HTTP 200 OK response with an XML containing at least the <atom:title>MessageTrace</atom:title> tag. Other responses will be incorrect; here are some examples and their explanation:

    1. 401 - Unauthorized: Access is denied due to invalid credentials.: your token is either invalid or outdated. Review the previous instructions to obtain a working token.

    2. No permission to access the report for the organization.: The role has not been properly assigned. Review these instructions to do it.

...