Microsoft Graph


Click here for Microsoft Graph error responses and resource types

Here is an example error:

format 500: The operation has timed out. ('generalException')

The Microsoft Graph error responses and resource types says generalException, An unspecified error has occurred.



urlpatterns = [
    url(regex=r"^microsoft/graph/", view=include("msgraph.urls")),


{% block content %}
  <div class="pure-g">
    {% include 'msgraph/_settings.html' %}
{% endblock content %}


  1. Register an application with the Microsoft identity platform

    e.g. for an app called ticket-3597-v1:

_images/msgraph-overview.png _images/msgraph-redirect-uris.png
  1. Under the applications API permissions page, choose Add a permission, select Microsoft Graph, and then choose the permissions your app requires under Application permissions:

_images/msgraph-application-permissions.png _images/msgraph-permissions-sites.png


The User.Read permission does not need to be selected. It is automatically Delegated when you select User.ReadWrite.


If you change permissions, users and/or admins will have to consent even if they have done so previously.

  1. Under the applications Certificates & secrets page in the Client secrets section, create a New client secret:



I think you only get a single chance to copy this secret!

  1. Copy the Application (client) ID to and client secret to your environment e.g:

    # .private
    set -x MSGRAPH_APPLICATION_ID "6731de76-14a6-4931de76-14a6-49ae"
    set -x MSGRAPH_CLIENT_SECRET "the-client-secret"
  2. Browse to Settings, Microsoft Graph, Get Consent

  1. Make a note of the Redirect URI for the next step:

  1. Under the applications Authentication page in the Redirect URIs section, set the redirect URI for your web site.



The Redirect URI is displayed on your web site under Settings, Microsoft Graph, Get Consent.