-
Notifications
You must be signed in to change notification settings - Fork 214
Understanding 'non_https_redirect_failed' AdalServiceException
The application gets the following AdalServiceException:
Non-HTTPS url redirect is not supported in webview ErrorCode: non_https_redirect_failed
Interactive authentication in ADAL.NET has been delegated to Azure AD by having a Web browser host pages generated by Azure AD. Although the interactive portion of the authentication flow can include redirects to pages not hosted in Azure AD, those pages all must guarantee that the traffic is occurring on trusted segments - that requires every redirect done in the browser control to target HTTPS protected endpoint, using a certificate whose issuer is on the device’s trusted roots, with subject corresponding to the actual network addressable URL, and so on. Violations would make the tokens exchanged at risk of man in the middle attack, token forwarding and various other problems.
The exception is typically thrown when:
- there’s a provider in the chain using HTTP: (for instance a shibboleth provider, an ADFS instance, a custom identity provider).
- another possibility is that the device is in a captive network, like in hotels, or shops, and the user didn’t grant consent to the term of usage and all traffic is redirected to a local HTTP page;
- yet another possibility is that the customer is the victim of a DNS attack and the feature is doing its job to prevent their credentials from being stolen
There is not much the application developer can do, apart from communicating to the user.
HTTP redirects in the web browser were disabled in ADAL.NET v3 v3.10.305110106
- Home
- Why use ADAL.NET?
- Register your app with AAD
- AuthenticationContext
- Acquiring Tokens
- Calling a protected API
- Acquiring a token interactively
- Acquiring tokens silently
- Using Device Code Flow
- Using Embedded Webview and System Browser in ADAL.NET and MSAL.NET
- With no user
- In the name of a user
- on behalf of (Service to service calls)
- by authorization code (Web Apps)
- Use async controller actions
- Exception types
- using Broker on iOS and Android
- Logging
- Token Cache serialization
- User management
- Using ADAL with a proxy
- Authentication context in multi-tenant scenarios
- Troubleshooting MFA in a WebApp or Web API
- Provide your own HttpClient
- iOS Keychain Access