Show TOC

Registering Devices and Connecting UsersLocate this document in the navigation structure

Register a device and log on a user using LogonCore and SecureStore library calls.


Define the application and client password policy in SAP Mobile Platform Server using the cockpit.


  1. Initialize the logonCore variable:
    var logonCore = await 
  2. Register the device by calling RegisterWithContextAsync. This sends an HTTP POST request to the SAP Mobile Platform Server with a payload to identify the device to the SAP Mobile Platform Server, which then registers the device and sends back the registration information as part of the response:
    var logonContext = new SAP.Logon.Core.LogonContext
    await logonCore.RegisterWithContextAsync(logonContext); 
        RegistrationContext = new SAP.Logon.Core.RegistrationContext
            ApplicationId = “App Id", ServerHost = “IP Address Or Hostname", IsHttps = false, 
            ServerPort = 8080
  3. Persist locally all registration information received from SAP Mobile Platform Server:
    await logonCore.PersistRegistrationAsync(passcode, logonContext);  
    The passcode is an arbitrarily chosen password that is eligible for the passcode policy sent back by the server.
  4. Store the application connection ID after logon:
    var connectionId = logonCore.ApplicationSettings.ApplicationConnectionId;