MicroStrategy ONE

List of Permissions and Server APIs for Android

The MicroStrategy Identity SDK includes several permissions for your third-party Android app. After you obtain authentication, you can access the following server APIs to get information that corresponds to your permissions:

Permission enumerations are reused between SSORequests and the authorize call described in Allowing Android App Users to Sign in with MicroStrategy IdentityUsing App-to-App Authentication.

If you are performing user interface (UI) tasks, always use runOnUiThread to make sure you are on the main thread, as request handlers may not be called on the main queue.

Implement SSORequestHandler to handle the return from SSORequest calls:

public interface SSORequestHandler {
	void handleSSORequest(SSORequest ssoRequest, Object result, int errorCode);
}

Account Name

Use this to retrieve a user's account name.

SSORequest ssoRequest = new SSORequest(SSOPermission.USHER_ACCOUNT_NAME);
ssoRequest.startWithHandler(this);
public void handleSSORequest(SSORequest request, Object result, int error) {
	if(error == 0) {
SSOAccountInfo ssoAccountInfo = (SSOAccountInfo)result;
	}
}

Email Address

Use this to retrieve a user's email address.

SSORequest ssoRequest = new SSORequest(SSOPermission.USHER_ACCOUNT_EMAIL);
ssoRequest.startWithHandler(this);
public void handleSSORequest(SSORequest request, Object result, int error) {
	if(error == 0) {
SSOAccountInfo ssoAccountInfo = (SSOAccountInfo)result;
	}
}

Profile Picture

Use this to retrieve a user's profile picture.

SSORequest ssoRequest = new SSORequest(SSOPermission.USHER_ACCOUNT_PROFILE_PICTURE);
ssoRequest.startWithHandler(this);
public void handleSSORequest(SSORequest request, Object result, int error) {
	if(error == 0) {
Bitmap accountPicture = (Bitmap)result;
	}
}

Verifying a QR Code

Use this to retrieve a badge from a QR code in string format.

SSORequest ssoRequest = new SSORequest(SSOPermission.VERIFY_QR_CODE);
ssoRequest.startWithHandler(this);
ssoRequest.setCode("setCodeValue");
public void handleSSORequest(SSORequest request, Object result, int error) {
	if(error == 0) {
SSOBadge badge = (SSOBadge)result;
	}
}

Where:

setCodeValue is the QR code, in string format, of the badge to be retrieved. For example, 310298udij0d1dhjsabdjasbd1390uejwqkle.

Verifying an Badge Code

Use this to retrieve a Badge by providing a numeric Badge Code in string format.

SSORequest ssoRequest = new SSORequest(SSOPermission.VERIFY_USHER_CODE);
ssoRequest.startWithHandler(this);
ssoRequest.setCode("setCodeValue");
public void handleSSORequest(SSORequest request, Object result, int error) {
	if(error == 0) {
SSOBadge badge = (SSOBadge)result;
	}
}

Where:

setCodeValue is the numeric Badge Code, in string format, of the badge to be retrieved. For example, 1234.

Viewing Badge Information

Use this to retrieve an authenticated badge.

Copy
SSORequest ssoRequest = new SSORequest(SSOP ermission.VIEW_BADGE);
ssoRequest.startWithHandler(this);
public void handleSSORequest(SSORequest request, Object result, int error) {
    if(error == 0) {
SSOBadge badge = (SSOBadge)result;
    }
}

Related Topics

Allowing iOS App Users to Sign In with MicroStrategy Identity Using Server-to-Server Authentication

Editing a Mobile App Configuration in MicroStrategy Identity

Deleting a Mobile App from a MicroStrategy Identity Network

Creating a MicroStrategy Identity Network and Issuing an Administrator Badge