java.lang.Object | |
↳ | com.microsoft.intune.mam.client.identity.MAMPolicyManager |
Allows multi-identity apps to specify the current identity, which will determine the active policy. Allows all apps to retrieve the active policy, or the policy for a specific identity.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static void |
bypassConditionalLaunchChecks(Activity activity)
Allow the given Activity to bypass conditional launch checks.
| ||||||||||
static String |
getCurrentIdentity(Context context)
This method is deprecated.
Use
getCurrentIdentityOID(Context) .
| ||||||||||
static String |
getCurrentIdentityOID(Context context)
Computes the current effective identity that will be used for policy and returns its AAD OID.
| ||||||||||
static String |
getCurrentThreadIdentity()
This method is deprecated.
Use
getCurrentThreadIdentityOID() .
| ||||||||||
static String |
getCurrentThreadIdentityOID()
Get the AAD OID of the current thread identity.
| ||||||||||
static AppPolicy |
getCurrentThreadPolicy()
Get the current app policy.
| ||||||||||
static boolean |
getIsIdentityManaged(String identity)
This method is deprecated.
Use
getIsIdentityOIDManaged(String) .
| ||||||||||
static boolean | getIsIdentityOIDManaged(String oid) | ||||||||||
static AppPolicy |
getPolicy(Context context)
Get the current app policy.
| ||||||||||
static AppPolicy |
getPolicy()
This method is deprecated.
Use
getCurrentThreadPolicy() .
| ||||||||||
static AppPolicy |
getPolicyForIdentity(String identity)
This method is deprecated.
Use
getPolicyForIdentityOID(String) .
| ||||||||||
static AppPolicy |
getPolicyForIdentityOID(String oid)
Get the applicable app policy for a given identity.
| ||||||||||
static String |
getProcessIdentity()
This method is deprecated.
Use
getProcessIdentityOID() .
| ||||||||||
static String |
getProcessIdentityOID()
Get the AAD OID of the process-wide identity.
| ||||||||||
static String |
getUIPolicyIdentity(Context context)
This method is deprecated.
Use
getUIPolicyIdentityOID(Context) .
| ||||||||||
static String |
getUIPolicyIdentityOID(Context context)
Get the AAD OID of the current UI identity.
| ||||||||||
static MAMIdentitySwitchResult |
setCurrentThreadIdentity(String identity)
This method is deprecated.
Use
setCurrentThreadIdentityOID(String) .
| ||||||||||
static MAMIdentitySwitchResult |
setCurrentThreadIdentityOID(String oid)
Set the current thread identity.
| ||||||||||
static MAMIdentitySwitchResult |
setProcessIdentity(String identity)
This method is deprecated.
Use
setProcessIdentityOID(String) .
| ||||||||||
static MAMIdentitySwitchResult |
setProcessIdentityOID(String oid)
Set the process-wide identity.
| ||||||||||
static void |
setUIPolicyIdentity(Context context, String identity, MAMSetUIIdentityCallback mamSetUIIdentityCallback)
This method is deprecated.
Use
setUIPolicyIdentityOID(Context, String, MAMSetUIIdentityCallback) .
| ||||||||||
static void |
setUIPolicyIdentity(Context context, String identity, MAMSetUIIdentityCallback mamSetUIIdentityCallback, EnumSet<IdentitySwitchOption> options)
This method is deprecated.
Use
setUIPolicyIdentityOID(Context, String, MAMSetUIIdentityCallback, EnumSet) .
| ||||||||||
static void |
setUIPolicyIdentityOID(Context context, String oid, MAMSetUIIdentityCallback mamSetUIIdentityCallback)
Set the associated identity with the Context.
| ||||||||||
static void |
setUIPolicyIdentityOID(Context context, String oid, MAMSetUIIdentityCallback mamSetUIIdentityCallback, EnumSet<IdentitySwitchOption> options)
Set the associated identity with the Context.
| ||||||||||
static void |
showDiagnostics(Context context)
Display the Intune Diagnostics screen.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Allow the given Activity to bypass conditional launch checks. This must be called before onMAMCreate, e.g. from the Activity's constructor or attachBaseContext() override. Because this method allows the bypass of conditional launch policy checks, it should only be used after consulting with Microsoft to confirm there is no other supported way to achieve your app’s desired behavior.
activity | The activity to exempt from the launch checks. |
---|
This method is deprecated.
Use getCurrentIdentityOID(Context)
.
Computes the current effective identity that will be used for policy and returns its UPN. The following identity sources are considered in order: 1. Thread 2. Context (UI identity) 3. Process 4. Default (empty string for multi-identity apps or apps with no policy, managed user for single-identity apps)
context | context to check identity on for (2) above |
---|
Computes the current effective identity that will be used for policy and returns its AAD OID. The following identity sources are considered in order: 1. Thread 2. Context (UI identity) 3. Process 4. Default (empty string for multi-identity apps or apps with no policy, managed user for single-identity apps)
context | context to check identity on for (2) above |
---|
This method is deprecated.
Use getCurrentThreadIdentityOID()
.
Get the UPN of the current thread identity.
Get the AAD OID of the current thread identity.
Get the current app policy. This does NOT take the UI (Context) identity into account. To take UI identity into account, use the override which takes a Context.
This method is deprecated.
Use getIsIdentityOIDManaged(String)
.
identity | identity |
---|
oid | AAD OID of the identity. |
---|
Get the current app policy.
context | for which the policy will be applicable. This is used to retrieve the UI identity. |
---|
This method is deprecated.
Use getCurrentThreadPolicy()
.
Deprecated alias for getCurrentThreadPolicy.
This method is deprecated.
Use getPolicyForIdentityOID(String)
.
Get the applicable app policy for a given identity.
identity | Identity to get policy for. |
---|
Get the applicable app policy for a given identity.
oid | AAD OID of the identity to get policy for. |
---|
This method is deprecated.
Use getProcessIdentityOID()
.
Get the UPN of the process-wide identity.
Get the AAD OID of the process-wide identity.
This method is deprecated.
Use getUIPolicyIdentityOID(Context)
.
Get the UPN of the current UI identity.
context | Context to get the identity from. |
---|
Get the AAD OID of the current UI identity.
context | Context to get the identity from. |
---|
This method is deprecated.
Use setCurrentThreadIdentityOID(String)
.
Set the current thread identity.
identity | UPN of identity to set. If null, the current thread identity is cleared. |
---|
Set the current thread identity.
oid | AAD OID of identity to set. If null, the current thread identity is cleared. |
---|
This method is deprecated.
Use setProcessIdentityOID(String)
.
Set the process-wide identity.
identity | UPN of new process-wide identity. If null, the process identity is cleared. |
---|
Set the process-wide identity.
oid | AAD OID of new process-wide identity. If null, the process identity is cleared. |
---|
This method is deprecated.
Use setUIPolicyIdentityOID(Context, String, MAMSetUIIdentityCallback)
.
Set the associated identity with the Context.
context | Context to set the identity in. |
---|---|
identity | UPN of new identity to set. If null, the Context identity is cleared. |
mamSetUIIdentityCallback | callback to notify the application the identity switch result. May be null. |
This method is deprecated.
Use setUIPolicyIdentityOID(Context, String, MAMSetUIIdentityCallback, EnumSet)
.
Set the associated identity with the Context.
context | Context to set the identity in. |
---|---|
identity | UPN of new identity to set. If null, the Context identity is cleared. |
mamSetUIIdentityCallback | callback to notify the application the identity switch result. May be null. |
options | Identity switch options. |
Set the associated identity with the Context.
context | Context to set the identity in. |
---|---|
oid | AAD OID of new identity to set. If null, the Context identity is cleared. |
mamSetUIIdentityCallback | callback to notify the application the identity switch result. May be null. |
Set the associated identity with the Context.
context | Context to set the identity in. |
---|---|
oid | AAD OID of new identity to set. If null, the Context identity is cleared. |
mamSetUIIdentityCallback | callback to notify the application the identity switch result. May be null. |
options | Identity switch options. |
Display the Intune Diagnostics screen.
context | App's context. |
---|