Skip to Content
avatar image
Former Member

SAPCP SDK for iOS + SAML Auth - how to access userdata

Hi!

We are implementing an iOS App with the SAPCPms for iOS SDK and are using SAML Authentication (SAP IA Service as provider). The auth part works fine, but we need to get access to the userdata (i.e. username, name and email). Browsing through the SDK documentation didn't give a hint on how to implement this.

We got the tip of a possible workaround via calling https://accounts.sap.com/ui/protected/userData after authentication and parsing the html, but so far no luck. Holding on to the SMP_COOKIE_STORE-cookie doesn't suffice. Is there a way for this to be accomplished (additional headers,..)?

Best Regards, Marlies

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    Same here - we're also looking to implement a similar feature. The SDK documentation didn't shed any light on this.

  • Get RSS Feed

3 Answers

  • Jun 19, 2017 at 10:58 AM

    Hi,

    I'm not entirely sure, but if I remember correctly, you should provide parameters to specify user data in the SAML assertion? I couldn't find it either, but I would have expected it to be part of the SAPcpmsSettingsParameter object you provide to the SAMLObserver, see https://help.sap.com/doc/978e4f6c968c4cc5a30f9d324aa4b1d7/Latest/en-US/Documents/Frameworks/SAPFoundation/Classes/SAMLObserver.html#/s:FP13SAPFoundation22SAPURLSessionObserving13sapURLSessionFTCS_13SAPURLSession8dataTaskCS_17SAPURLSessionTask10didReceiveCSo11URLResponse17completionHandlerFOS1_19ResponseDispositionT__T_

    At https://help.sap.com/doc/978e4f6c968c4cc5a30f9d324aa4b1d7/Latest/en-US/Documents/Frameworks/SAPFoundation/Authentication.html there are some topics about customisation (no userData though) but maybe this helps?

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 27, 2017 at 09:49 AM

    Marlies,

    This information isn't accessible locally on the client. We're working on adding and integrating a service from Mobile Services that can be used to query the username after a successful login. We intend to deliver this service in a future release of the SDK

    If you need a faster solution, you might be able to replicate this in your custom app by exposing a service yourself on Cloud Platform (or your backend) that the mobile client can query.

    Thanks
    Andreas

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Andreas,

      We would be very interested in such a thing. When could we expect this to be available, if not already?

      Thank you

      Garin

  • Mar 01 at 02:12 PM
    Add comment
    10|10000 characters needed characters exceeded