social-core icon indicating copy to clipboard operation
social-core copied to clipboard

Update Azure AD B2C base url to the latest url as stated in the Microsoft docs

Open jonatns opened this issue 4 years ago • 4 comments

Proposed changes

Using login.microsoftonline.com for Azure AD B2C has been deprecated and it will be removed later this year. See Deprecation notice. Even though login.microsoftonline.com is still being supported by Microsoft I was not able to get it working for a new Azure AD B2C Tenant. Updating the BASE_URL to the new url and moving the policy to the url itself instead of a query parameter works correctly. This is how it's stated in the latest docs for Azure AD B2C OpenID Connect.

Types of changes

Please check the type of change your PR introduces:

  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Code style update (PEP8, lint, formatting, renaming, etc)
  • [ ] Refactoring (no functional changes, no api changes)
  • [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Build related changes (build process, tests runner, etc)
  • [ ] Other (please describe):

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • [x] Lint and unit tests pass locally with my changes
  • [ ] I have added tests that prove my fix is effective or that my feature works

Other information

SOCIAL_AUTH_AZUREAD_B2C_OAUTH2_TENANT_ID was changed to SOCIAL_AUTH_AZUREAD_B2C_OAUTH2_TENANT_NAME since only the tenant name is needed now.

jonatns avatar May 07 '20 02:05 jonatns

I recently ran into this situation and had to create a new backend locally for this. I'm unclear on if (or how) the current Azure B2C backend would still be functional for anyone based on the changes Microsoft has made recently to this flow.

The only thing I can think of is that they may still be maintaining backwards compatibility for B2C tenants that were created prior to some date in the past.

I'd love to hear feedback from anyone using the Azure B2C backend. Thanks!

digismack avatar Nov 30 '21 18:11 digismack

Looks good. Can you please also add documentation for this to https://github.com/python-social-auth/social-docs/blob/master/docs/backends/azuread.rst?

nijel avatar Dec 14 '21 20:12 nijel

@nijel How can I test this? Can I get this PR as a docker image somehow so that I can easily run it in my cloud environment? Also, the status above indicates some conflicts.

I am happy to help if you guys assist and guide me.

svdHero avatar Aug 01 '22 11:08 svdHero