1

I have Azure App service with SSL. And mobile app (Xamarin android, ios) consumes service APIs through MobileServiceClient. There is no option in MobileServiceClient to add certificate. I googled it but not single document with to solve this problem.

How to achieve SSL pinning with MobileServiceClient?

2 Answers2

2

As you mentioned that it seems not supported to add certificate in MobileServiceClient.

If we try to do that, based on my understanding, we need to override server side authentication flow. More detail please refer to this tutorial. I also find another SO thread related to this. We also need to override the DelegatingHandler on the client side.

Additionally, here are some useful tutorials:

Code sample AzureWebApiClientCertAuthSample

Azure App Service and Client Certificate Authentication

Besides, we also could give our feedback to Azure App team.

Tom Sun - MSFT
  • 24,161
  • 3
  • 30
  • 47
1

I know I'm way late to this party, but for anyone else looking, I was able to add a client certificate by doing the following:

X509Certificate2 cert = GetCertificate();    
HttpClientHandler httpClientHandler = new HttpClientHandler();
httpClientHandler.ClientCertificates.Add(cert);
client = new MobileServiceClient(Constants.ApplicationURL, httpClientHandler);