Answered by:
Web API using windows authentication + Xamarin Client

Question
-
User1561558160 posted
Hi all,
I'm working on an android application and I need to make sure the user is connected, so our manager wants to use the active directory to verify if the right user is connected. So I created a web api that uses windows auth and from my android app I sen a webrequest with the username and compare it with the AD... All that is through VPN
The problem is on my android app when I send the webrequest I get this error: {System.Net.WebException: The remote server returned an error: (401) Unauthorized. This happends because the web api requires a login and password when we access it....
My question is: is there a solution to keep using the AD from the android app? Any ideas how?
Thanks,Wednesday, September 9, 2015 11:07 AM
Answers
-
User-111650791 posted
Hi Ahmed,
Go through this link for a start.
http://www.asp.net/web-api/overview/security/basic-authentication
Thanks,
Unnikrishnan
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, September 9, 2015 11:39 AM -
User-84896714 posted
Hi AhmedLAGRINI,
Thank you for your post. Based on your description, I think you should use a third party library to fix it. Link below is for your reference.
https://github.com/AzureADSamples/NativeClient-Xamarin-AndroidBest Regards,
Wang Li- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, September 10, 2015 3:32 AM
All replies
-
User-111650791 posted
Hi Ahmed,
Go through this link for a start.
http://www.asp.net/web-api/overview/security/basic-authentication
Thanks,
Unnikrishnan
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, September 9, 2015 11:39 AM -
User-84896714 posted
Hi AhmedLAGRINI,
Thank you for your post. Based on your description, I think you should use a third party library to fix it. Link below is for your reference.
https://github.com/AzureADSamples/NativeClient-Xamarin-AndroidBest Regards,
Wang Li- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, September 10, 2015 3:32 AM