Kony Management API Guide: App Management EMM JS APIs > Get User Details API

Get User Details API

The Get User Details API helps a developer to get user ID and email ID from the policy sent from the EMM server.

For Android, this API returns a JSON string. For iOS, this API returns a dictionary.

Important: This API is available from the release 3.0.3 onwards.

com.kony.iemm.app.getUserDetails()

This method returns a dictionary that contains the following:

Signature

JavaScript: com.kony.iemm.app.getUserDetails(); 

Input Parameters

None

Result Values

{
“username”:”admin”,
“userid” : “admin”,
“emaild” : “admin@kony.com”
}

Examples

var userDetailsJsonString = com.kony.iemm.app.getUserDetails();

The output will be a JSON string
For example,

{“username”:”admin”,
“userid” : “admin”,
“emaild” : “admin@kony.com”
}

To read the particular key, JSON string is converted in to a JSON table using JSON.parse API.

var userDetailsJsonTable=JSON.parse(userDetailsJsonString);

Individual keys can be accessed using the following.

Copyright © 2017 Kony, Inc. All rights reserved.