Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
midhun_vp
Active Contributor

SAP Mobile Platform supports multiple built-in authentication providers that authenticate users. The SMP administrators can create security profile and assign the authentication providers using Management Cockpit.

In this example I am going to show you how to use LDAP to authenticate from your mobile application.


When I started, I did't find any existing LDAP setup, so I have configured one. If you don't have an existing LDAP Server you can follow by blog, it's quite easy using Apache Directory Studio: Configuring LDAP -  A Basic Tutorial

Configuring LDAP security profile

     1. Login to SMP Admin Cockpit.

     2. Click on Security Tab. Under Security Profiles click on New button. It will open Edit Security Profile window.

     

     3. On Name field enter "LDAP", then click on Add button.

         It will open Add Authentication Provider window.

     

     4. Choose Authentication providers as Directory Service (LDAP/AD) and provide the below details:

PropertyValue
Control FlagOptional
Server Typesunone5
Provider URLldap://localhost:10389
Security ProtocolLDAP
Bind DNuid=admin,ou=system
Bind Passwordsecret
Authentication Search Baseou=users,ou=system
Skip Role Lookuptrue
Role Member Attributesuniquemember
User Role Membership AttributesnsRoleDN
Default Search Baseou=users,ou=system


     Leave all other fields with default values.

     After entering the values the screen should look like below:

     

    

     5. Click on Save.

Configuring Application

     1. Go to Applications panel.

     2. Click on New button. It will open New Application window.

     3. On ID field enter LDAPAuth and click on Save. It will open a new window.

     

     4. On field Endpoint enter http://services.odata.org/V2/Northwind/Northwind.svc/

     5. Under SSO Mechanisms, click on Add. Then click on Save.

     

     6. Click on Authentication Tab. For field Profile Name choose LDAP.

     

     7. Click on Save.

Authenticate using LDAP

     1. Run Post man rest client on Chrome and provide below values. Pass LDAP credentials to register.

      

     2. Click on on Send button. It will register the user on SMP server.

         Success response from Postman Rest Client:

     

On SMP Admin cockpit you can find the registered user.

   

To  register user from a mobile app there is no LDAP specific device code needed if you are using MAF Logon or LogonCore class or REST API.

CC:

SMP Developer Center

Regards, Midhun

SAP Technology RIG

30 Comments
Labels in this area