<a id="microsoft-graph"></a>

# Microsoft Graph

<a id="backend-class"></a>

## Backend class

For Django, add this class path to `AUTHENTICATION_BACKENDS`. For other
integrations, use the same class path in the framework-specific backend
setting.

| Backend name      | Class path                                       |
|-------------------|--------------------------------------------------|
| `microsoft-graph` | `social_core.backends.microsoft.MicrosoftOAuth2` |
1. Go to [Azure portal](https://portal.azure.com/) and create an application.
2. Fill App Id and Secret in your project settings:
   ```default
   SOCIAL_AUTH_MICROSOFT_GRAPH_KEY = '...'
   SOCIAL_AUTH_MICROSOFT_GRAPH_SECRET = '...'
   ```
3. Enable the backend:
   ```default
   SOCIAL_AUTH_AUTHENTICATION_BACKENDS = (
       ...
       'social_core.backends.microsoft.MicrosoftOAuth2',
       ...
   )
   ```

[Register an application with the Microsoft identity platform](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app).
