Enterprise ADFS login working with Xamarin Custom Android app using .net SDK?

1771
8
03-10-2020 11:41 AM
by Anonymous User
Not applicable

 Nicholas Furness

Anybody here with the experience of getting Enterprise ADFS login working with Xamarin Custom Android app using .net SDK?

  • Facing issue with authenticating to enterprise GIS portal.
  • Using .Net SDK 100.7 & Xamarin Forms 4.5 ,
  • Exactly following the demo here :
    • https://developers.arcgis.com/net/latest/forms/sample-code/authenticate-with-oauth/

When we click on Enterpirse login, the screen blanks account. In ESRI's Collector app, we get the popup for entering Username and password. We would like to get the similar behaviour for the user to enter the ADFS login credentials.

0 Kudos
8 Replies
Nicholas-Furness
Esri Regular Contributor

Thanks Tamilmani, Rajesh‌. Could you provide more info on the issues you're experiencing. For example, are you seeing any errors returned from the Runtime (and what are they)?

0 Kudos
by Anonymous User
Not applicable

We can reach till Enterprise login option

@ Nicholas Furness When we click on Enterpirse login, the screen blanks out. In ESRI's Collector app, we get the popup for entering Username and password. We would like to get the similar behaviour for the user to enter the ADFS login credentials.

0 Kudos
dotMorten_esri
Esri Notable Contributor

Since it's a Forms app, does the code work on UWP and/or iOS? Curious if the problem is the code itself, or the android http stack.

0 Kudos
by Anonymous User
Not applicable

Morten Nielsen Thank you for the reply. The app is particulary developed to work in Android Platform. Sorry, we never needed to test it on iOS. Also, I have tried the demo Authenticate with OAuth | ArcGIS for Developers  , still it does not work as expected.

0 Kudos
dotMorten_esri
Esri Notable Contributor

Could you please try the demo app you're referring to with a different platform then (iOS, UWP or Android) ? It would be very helpful for trouble shooting if we know whether we have to focus on an Android specific issue, or a general oauth issue with this specific authentication type.

by Anonymous User
Not applicable

Nicholas Furness‌ We have tested against the Runtime WPF security login sample and that is does indeed work. 

Authenticate with OAuth | ArcGIS for Developers 

0 Kudos
dotMorten_esri
Esri Notable Contributor

Thanks. That confirms it's most likely the Android HTTP Stack that has some problems with authenticating against that specific service. Unfortunately Xamarin.Android doesn't have a great single http implementation that fits all scenarios.
I'd recommend trying picking a different HTTP stack for Android as documented here: HttpClient Stack and SSL/TLS Implementation Selector for Android - Xamarin | Microsoft Docs 

0 Kudos
by Anonymous User
Not applicable

Morten NielsenNicholas Furness‌ We have tested the app using external internet connection against ArcGIS Online. The app works successfully.  It can authenticate against feds(our ADFS) when access from an external network but not when on internal/VPN. Meaning that, the app works outside our office network. Does it point to anything?

0 Kudos