AuthenticationContext with web proxy in ADAL

IceCanh 1 Reputation point
2021-01-27T04:24:55.2+00:00

I am developing app on 2 platforms Android and UWP.
I am using ADAL to get access token with webproxy.

About UWP (.NET):
I found official documentation for issue "ADAL support webproxy".
ADAL provides a constructor to customize the proxy with IHttpClientFactory

   AuthenticationContext(String, Boolean, TokenCache, IHttpClientFactory)  

I tried it and it was as expected.
Link: https://learn.microsoft.com/en-us/dotnet/api/microsoft.identitymodel.clients.activedirectory.authenticationcontext?view=azure-dotnet

About Android:
Up to now, I haven't found yet an official documentation for ADAL support custom proxy.
Is the ADAL for the 2 platforms different?
Is there a document that describes the above issue?

This is my first question on Microsoft Q&A ^^
Please support me if possible.
Thank you so much.

Microsoft Security Microsoft Entra Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. VipulSparsh-MSFT 16,311 Reputation points Microsoft Employee
    2021-01-28T08:34:41.297+00:00

    @IceCanh Thanks for reaching out on Q&A.

    Hope you are already aware that Microsoft now recommends using the Microsoft Authentication Library (MSAL) for authentication and authorization of Azure AD entities instead of ADAL.
    If you want to know about the benefit of using MSAL over ADAL, have a look here.
    If you still want to use ADAL, look at this thread for your scenario.

    You can see more information here,about how to use custom proxy for publicClientapplication in MSAL rather than AuthenticationContext in ADAL.

    -----------------------------------------------------------------------------------------------------------------

    If the suggested response helped you resolve your issue, please do not forget to accept the response as Answer and "Up-Vote" for the answer that helped you for benefit of the community.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.