Developer

Getting the Configuration Without the Mobile Place UI

You can get the SAP Mobile Place configuration without using the Mobile Place UI.

Prerequisites

Add the MobilePlace library to your product through Start of the navigation path Project's References Next navigation step Manage NuGet Packages End of the navigation path.

The following dependent library will also be installed as a NuGet package:
  • SAP.Supportability

Procedure

Get the configuration. For example:
var configuration = await SAP.Logon.MobilePlace.ConfigurationService.GetApplicationConfigurationAsync("email@email", "appid", "appversion");

string host = configuration.Host;
ushort? port = configuration.Port;
string protocol = configuration.Protocol;
foreach (var authenticationSettings in configuration.Authentication) {
	switch (authenticationSettings.AuthenticationType) {
		case SAP.Logon.MobilePlace.ConfigurationType.Basic:
			…
			break;
		case SAP.Logon.MobilePlace.ConfigurationType.Saml2: {
			var samlConfig = authenticationSettings.Configuration as SAP.Logon.MobilePlace.ISamlConfiguration;
					Console.WriteLine("\tsuffix: {0}", samlConfig.SamlFinishEndpointSuffix);
					Console.WriteLine("\tendpoint parameter: {0}", samlConfig.SamlFinishEndpointParameter);
					Console.WriteLine("\theader: {0}", samlConfig.SamlIdentifyingHeader);
		}
			break;
		case SAP.Logon.MobilePlace.ConfigurationType.Certificate:
			…
			break;
		case SAP.Logon.MobilePlace.ConfigurationType.Custom:
			…
			break;
		default: break;
	}
}