Skip to content

Commit dc7a878

Browse files
authored
Update documentation for Azure AD B2C (#145)
* Updates to match proposed changes to social-core * Fix spacing
1 parent ce00223 commit dc7a878

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

docs/backends/azuread.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ To enable OAuth2 B2C Tenant support:
9191
- Fill in ``Client ID`` and ``Client Secret`` settings. These values can be
9292
obtained easily as described in `Azure AD Application Registration`_ doc::
9393

94-
SOCIAL_AUTH_AZUREAD_B2C_TENANT_OAUTH2_KEY = ''
95-
SOCIAL_AUTH_AZUREAD_B2C_TENANT_OAUTH2_SECRET = ''
94+
SOCIAL_AUTH_AZUREAD_B2C_OAUTH2_KEY = ''
95+
SOCIAL_AUTH_AZUREAD_B2C_OAUTH2_SECRET = ''
9696

9797
- Fill in the tenant id::
9898

99-
SOCIAL_AUTH_AZUREAD_B2C_TENANT_OAUTH2_TENANT_ID = ''
99+
SOCIAL_AUTH_AZUREAD_B2C_OAUTH2_TENANT_NAME = ''
100100

101101
- Fill in the B2C policy::
102102

@@ -106,29 +106,28 @@ The policy should start with `b2c_`. For more information see `Azure AD B2C User
106106

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

109-
SOCIAL_AUTH_AZUREAD_B2C_TENANT_OAUTH2_RESOURCE = ''
109+
SOCIAL_AUTH_AZUREAD_B2C_OAUTH2_RESOURCE = ''
110110

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

115115
When using Microsoft Graph, the resource needed is::
116116

117-
SOCIAL_AUTH_AZUREAD_B2C_TENANT_OAUTH2_RESOURCE = 'https://graph.microsoft.com/'
117+
SOCIAL_AUTH_AZUREAD_B2C_OAUTH2_RESOURCE = 'https://graph.microsoft.com/'
118118

119119
- Add the backend to the authentication backends setting::
120120

121121
AUTHENTICATION_BACKENDS = (
122122
...
123-
'social_core.backends.azuread_tenant.AzureADB2COAuth2',
123+
'social_core.backends.azuread_b2c.AzureADB2COAuth2',
124124
...
125125
)
126126

127-
- If you are using an authority host other than the default ``AZURE_PUBLIC_CLOUD`` ('login.microsoftonline.com')
128-
then you can override the default with the ``AUTHORITY_HOST`` setting. The Azure authority hosts are listed
129-
in the `Azure Authority Hosts`_ doc::
127+
- If you are using an authority host other than the default ``AZURE_PUBLIC_CLOUD`` ('b2clogin.com')
128+
then you can override the default with the ``AUTHORITY_HOST`` setting.
130129

131-
SOCIAL_AUTH_AZUREAD_B2C_TENANT_OAUTH2_AUTHORITY_HOST = ''
130+
SOCIAL_AUTH_AZUREAD_B2C_OAUTH2_AUTHORITY_HOST = ''
132131

133132
.. _Azure AD Application Registration: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app
134133
.. _Azure AD B2C User flows and custom policies overview: https://docs.microsoft.com/en-us/azure/active-directory-b2c/user-flow-overview

0 commit comments

Comments
 (0)