microsoftconnect / ms-intune-app-sdk-android

Intune App SDK for Android enables data protection features and mobile app management via Microsoft Intune
41 stars 17 forks source link

Unable to read App configuration , configuration key values #201

Closed frpaf closed 6 months ago

frpaf commented 6 months ago

Intune Android App SDK Policy Enforcement Issue

Questions to Ask Before Submission

  1. Have you completed the exit criteria for each phase in the [Intune App SDK for Android Integration Guide]? Yes, There is a working copy of the intune sdk in the play store with an app config trying to read a key value from the app config.
  2. Have you checked the [Microsoft Intune App SDK for Android] repository for similar issues? Yes, Could not find any issues similar
  3. Are you using the latest version of the [SDK]? Yes. Downloaded from the ms intune sdk

Summary

Each phase of the [Intune App SDK for Android Integration Guide] outlines specific exit criteria for proceeding to subsequent phases.

Please reference the specific exit criteria scenario that is failing.

Repro Steps

A copy of the source project with the issue is available at https://github.com/franferns/intune-app

Please provide concrete steps to reproduce the issue you are encountering.

  1. Integrating the intune sdk creating a folder in the app folder with MAMSDK with

    image
  2. Making changes to the root build.gradle file

    image
  3. Making changes to app/build.gradle file adding reference to the sdk aar file

    image

and the settings.gradle file.

image
  1. And then the code for accessing the config from the

    image
  2. The app configuration policy configured is as follows image

Expectation: To be able to read configured values app config policy "CustomerURL" the value returned is null . Shown as a toast message.

Observation: The code where we get an instance of the MAMAppConfig returns a object even on an non company portal device . Isnt it suppose to return null for no work profile (non company portal) related devices.

Details

A copy of the source project with the issue is available at https://github.com/franferns/intune-app

bannus commented 6 months ago

Please read the exit criteria for the App Configuration section of our docs. App configuration can be configured for managed apps (as shown in your screenshots) or for managed devices.

To receive managed app config, the user must be MAM-enrolled (see MAM integration essentials).

To receive managed device config, the device must be enrolled (see Enroll Android devices).