title: Azure Mobile App Service / Xamarin iOS client / Okta Identity Provider example
body: <p>Here's my current situation:</p>
  <ul>
  <li><code>Xamarin iOS</code> mobile app (using <code>MobileServiceClient</code> to login)</li>
  <li><code>Azure Mobile/App Service</code> (<code>ASP.NET Web API</code>) with <code>Azure AD</code> authentication</li>
  </ul>
  <p>I would like to modify the Authentication part of this process to be handled by <code>Okta</code> instead of the <code>Azure AD</code>. How can I setup <code>Okta</code> or any other 3rd party <code>Identity Provider Service</code> similar to <code>Okta</code> as the ipd for both my mobile app and the api web service? Azure claims that you can use any Auth capable 3rd party provider but I don't see any way to integrate such a provider in Azure portal.</p>
  <p>I found this url to a tutorial for custom Authentication: <a href="https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/chapter2/custom/" rel="nofollow noreferrer">https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/chapter2/custom/</a></p>
  <p>From this post:
  <a href="https://stackoverflow.com/questions/39832558/identityserver-4-as-identity-provider-for-azure-app-service">IdentityServer 4 as Identity Provider for Azure App Service</a></p>
  <p>Is this really the only way to do it? I would really rather keep using the server flow through <code>MobileServiceClient</code> and configure Azure to use the 3rd party OAuth identity provider, does any one have an example or additional information on how to do this?</p>
  <p>Thank you for your help, maybe someone from the Azure team can enlighten us on this topic, I have not seen any documentation or examples of how to do it in their documentation so far.</p>
  <h2>Client:</h2>
  <p>Found a working library for OAuth2 and OpenID that worked for integrating with Okta:
  <a href="https://github.com/openid/AppAuth-iOS" rel="nofollow noreferrer">https://github.com/openid/AppAuth-iOS</a><br />
  <a href="https://github.com/openid/AppAuth-iOS/tree/master/Examples" rel="nofollow noreferrer">https://github.com/openid/AppAuth-iOS/tree/master/Examples</a></p>
  <p>with a Xamarin wrapper:
  <a href="https://github.com/xamarin/XamarinComponents/tree/master/XPlat/OpenId" rel="nofollow noreferrer">https://github.com/xamarin/XamarinComponents/tree/master/XPlat/OpenId</a></p>
  <p>Tested it with Okta for client Auth with 2 factor authentication and it works well. On to figure out the App Service part.</p>