Integrate SAML With A Hybrid App Built Using Mobile SDK

I have been developing apps using the Mobile SDK for a while now. All my apps till date use the built-in oAuth mechanism provided by the Mobile SDK for authentication. I have now encountered a use case where the client prefers to use a 3rd party SAML server instead of the built-in oAuth authentication.

This is one of the few tutorials on this topic and it somewhat ambiguously mentions

“Note: notably missing from supported clients are the Mobile CRM products. It is planned that the next generation of mobile CRM products, as well as mobile development offerings will support SAML based single sign-on. In the meantime, Delegated Authentication is the supported option.”

It mentions that it’s possible to do oAuth and SAML together but not just SAML based delegated authentication.

There’s another link which mentions

Q: The Mobile SDK for building hybrid application uses OAuth 2.0. Does it also support SAML 2.0 based authentication?
A: Yes. You can configure OAuth 2.0 to authenticate via SAML 2.0. See this article for further details.

This again mentions you could configure oAuth to use SAMLE. I am looking for some detailed inputs on if it’s possible to SAML auth (no oAuth) with an app built using the Mobile SDK and if so how?

Answer

As I noted in a comment above, if your organization is set up to use SAML as the means of authentication (which requires a MySalesforce URL), then the SDK should redirect authentication to the SAML authentication page in question rather than the OAuth page. This does require your application to reference the MySalesforce URL for authentication rather than login.salesforce.com.

http://wiki.developerforce.com/page/Single_Sign-On_for_Desktop_and_Mobile_Applications_using_SAML_and_OAuth

Attribution
Source : Link , Question Author : Gaurav Kheterpal , Answer Author : Michael Welburn

Leave a Comment