Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Federated flow fix #240

Merged
merged 4 commits into from
Sep 17, 2020
Merged

Federated flow fix #240

merged 4 commits into from
Sep 17, 2020

Conversation

abhidnya13
Copy link
Contributor

While testing for migration of Fairfax, username-password federated was failing, this PR includes the fix.

The problem was ADAL was hardcoding Cloud_audience_urn which is now fetched from the mex response.

@abhidnya13 abhidnya13 requested a review from rayluo September 16, 2020 23:04
Copy link
Collaborator

@rayluo rayluo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Abhi for testing this on an internal migration environment. This fix helps to resolve an "InvalidScope : FaultMessage: ID3082: The request scope is not valid or is unsupported." error.

adal/token_request.py Outdated Show resolved Hide resolved
@abhidnya13
Copy link
Contributor Author

Tested the flows with WW authority and they work fine. Merging this in.

@abhidnya13 abhidnya13 merged commit be39feb into dev Sep 17, 2020
@abhidnya13 abhidnya13 deleted the federated_flow_fix branch September 17, 2020 23:47
@@ -131,6 +132,7 @@ def _parse_discovery_response(self, body):
self.federation_protocol = protocol
self.federation_metadata_url = response['federation_metadata_url']
self.federation_active_auth_url = response['federation_active_auth_url']
self.cloud_audience_urn = response.get('cloud_audience_urn', "urn:federation:MicrosoftOnline")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that this would be the same approach as what ADAL C++ does for years now.

[4:21 PM] Petar Dimov
So what ADAL Cpp does is. If we receive it from the userrealm request, we will use what we receive. Otherwise we default to urn:federation:MicrosoftOnline

​[4:30 PM] Abhidnya Patil
Cpp confirmed they pull it from userrealm response, Travis : https://github.com/AzureAD/azure-activedirectory-library-for-cpp/blob/dev/src/cpp/src/lib/windows/UserRealm.cpp#L233

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants