java.lang.Object | |
↳ | com.microsoft.intune.mam.client.app.AllowedAccounts |
Allows an app to find out whether the accounts allowed to be signed in are restricted and if so which accounts are allowed. The MAM SDK provides this, information but it does not perform any enforcement. If accounts are restricted, it is the app's responsibility to allow only the allowed accounts to sign in and to remove any accounts which are not in the allowed set. Allowed accounts are identified by UPN, and in most cases by AAD user id.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static List<AllowedAccountInfo> |
getAllowedAccounts()
Returns the list of allowed accounts or null if restrictions are not in place.
| ||||||||||
static boolean |
isAccountAllowed(String upnOrAADId)
Check if the given UPN or AAD user id (both case-insensitive) is allowed to sign in.
| ||||||||||
static void |
listenForChanges(AllowedAccountsListener listener)
Listen for changed to the allowed account list.
| ||||||||||
static void |
unregisterListener(AllowedAccountsListener listener)
Unregister a listener previously passed to listenForChanges.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Returns the list of allowed accounts or null if restrictions are not in place. If the list is non-null, the app is expected to allow only AAD-based accounts corresponding to the listed UPNs to sign in.
Check if the given UPN or AAD user id (both case-insensitive) is allowed to sign in.
upnOrAADId | UPN or AAD id to check |
---|
Listen for changed to the allowed account list. The provided listener will be invoked if and when changes occur.
listener | listener to receive change notifications |
---|
Unregister a listener previously passed to listenForChanges. Note that it is recommended to maintain a listener for the process lifetime to ensure that your app responds to changes in allowed account promptly, and therefore most apps are not expected to need this method. If you unregister all listeners, you must take care to check the value of getAllowedAccounts() to respond to changes as soon as possible.
listener | listener to unregister |
---|