Skip to content

Commit

Permalink
Merge branch 'sdementen-feature/azuread-tenant'
Browse files Browse the repository at this point in the history
  • Loading branch information
omab committed Oct 23, 2017
2 parents 4f1160d + 6d65c8b commit 2b9d67a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased](https://github.com/python-social-auth/social-docs/commits/master)

### Added
- Added note on using tenants in Azure AD backend.
- Added note about Microsoft Graph support with AzureAD backend.
- Added Slack team limit setting
- Added Bungie OAuth2 backend documentation
Expand Down
43 changes: 43 additions & 0 deletions docs/backends/azuread.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,47 @@ To enable OAuth2 support:

SOCIAL_AUTH_AZUREAD_OAUTH2_RESOURCE = 'https://graph.microsoft.com/'


Tenant Support
--------------

If the app is linked to a specific tenant (vs the common tenant) it's
possible to use a version of the backend with tenant support.

*Note: The backend are split because of the needed cryptography
dependencies which must be installed manually.*


To enable OAuth2 Tenant support:

- Fill in ``Client ID`` and ``Client Secret`` settings. These values can be
obtained easily as described in `Azure AD Application Registration`_ doc::

SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_KEY = ''
SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_SECRET = ''

- Fill in the tenant id::

SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_TENANT_ID = ''

- Also it's possible to define extra permissions with::

SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_RESOURCE = ''

This is the resource you would like to access after authentication succeeds.
Some of the possible values are: ``https://graph.windows.net`` or
``https://<your Sharepoint site name>-my.sharepoint.com``.

When using Microsoft Graph, the resource needed is::

SOCIAL_AUTH_AZUREAD_OAUTH2_RESOURCE = 'https://graph.microsoft.com/'

- Add the backend to the authentication backends setting::

AUTHENTICATION_BACKENDS = (
...
'social_core.backends.azuread_tenant.AzureADTenantOAuth2',
...
)

.. _Azure AD Application Registration: https://msdn.microsoft.com/en-us/library/azure/dn132599.aspx

0 comments on commit 2b9d67a

Please sign in to comment.