Skip to Content
0

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

Jun 09, 2017 at 09:35 AM

165

avatar image
Former Member

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

10 |10000 characters needed characters left 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.

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Robin van het Hof
Jun 19, 2017 at 10:58 AM
0

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?

Share
10 |10000 characters needed characters left characters exceeded
Andreas Schlosser
Jun 27, 2017 at 09:49 AM
0

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

Show 1 Share
10 |10000 characters needed characters left 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

0
Andreas Schlosser
Mar 01 at 02:12 PM
0
Share
10 |10000 characters needed characters left characters exceeded