Forum Discussion

JeremyTBradshaw's avatar
JeremyTBradshaw
Steel Contributor
Jul 13, 2020
Solved

Guidance with Outlook App Configuration Policies and Conf.Keys for Android

First off, I'm referring to the Configuration Key com.microsoft.intune.mam.AllowedAccountUPNs, documented here https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/outlook-for-ios-and-android/outlook-for-ios-and-android-configuration-with-microsoft-intune#organization-allowed-accounts-mode-settings-1

 

For Android, there is one Configuration Key listed, this one.  The page doesn't tell us the value type, though by its name, it seems like it should be an array of strings.  When it comes down to using it, we have to set it to String for the type, and then I'm having hit and miss results with the initial account setup.  Sometimes, it's letting me setup just the UPN of the current user, and then later I can add additional accounts that are also listed in the array.  This is what I would say is the good alternative to the On/Off switch for Organizational Accounts Only Mode.

 

However, sometimes, new Outlook setups will show all the UPNs in the array, as if it is one string, which obviously doesn't work at all.

 

I am hoping somebody can help me here with how this key is supposed to work, or not.  Anyone have much experience with this that can shed any light?

 

Thanks in advance.

  • FYI in case anyone else gets in their own way like I do/did...

     

    The answer is that we still use "valueString" as the type, but then we separate UPNs in our list using semicolon instead of comma.  I found this info here:

     

    https://docs.microsoft.com/en-us/mem/intune/apps/app-configuration-policies-use-android#allow-only-configured-organization-accounts-in-multi-identity-apps

     

    Specifically:

    Allow only configured organization accounts in multi-identity apps

    As the Microsoft Intune administrator, you can control which work or school accounts are added to Microsoft apps on managed devices. You can limit access to only allowed organization user accounts and block personal accounts on enrolled devices. For Android devices, use the following key/value pairs in a Managed Devices app configuration policy:

    Key: com.microsoft.intune.mam.AllowedAccountUPNs

    Values:

    • One or more ; delimited UPNs.
    • Only account(s) allowed are the managed user account(s) defined by this key.
    • For Intune enrolled devices, the {{userprincipalname}} token may be used to represent the enrolled user account.

    "Only account(s) allowed are the managed user account(s) defined by this key." is oddly-written but oh well.

  • FYI in case anyone else gets in their own way like I do/did...

     

    The answer is that we still use "valueString" as the type, but then we separate UPNs in our list using semicolon instead of comma.  I found this info here:

     

    https://docs.microsoft.com/en-us/mem/intune/apps/app-configuration-policies-use-android#allow-only-configured-organization-accounts-in-multi-identity-apps

     

    Specifically:

    Allow only configured organization accounts in multi-identity apps

    As the Microsoft Intune administrator, you can control which work or school accounts are added to Microsoft apps on managed devices. You can limit access to only allowed organization user accounts and block personal accounts on enrolled devices. For Android devices, use the following key/value pairs in a Managed Devices app configuration policy:

    Key: com.microsoft.intune.mam.AllowedAccountUPNs

    Values:

    • One or more ; delimited UPNs.
    • Only account(s) allowed are the managed user account(s) defined by this key.
    • For Intune enrolled devices, the {{userprincipalname}} token may be used to represent the enrolled user account.

    "Only account(s) allowed are the managed user account(s) defined by this key." is oddly-written but oh well.

    • MetinBaygul's avatar
      MetinBaygul
      Copper Contributor

      Do you have examples with screenshots? Because this is not clear what you describe here.

      • JeremyTBradshaw's avatar
        JeremyTBradshaw
        Steel Contributor

        Here's a quick screenshot from my current lab env.  Still looks mostly the same.  Once you turn on Work Accounts only, you will see the AllowedAccountUPNs configuration key show up.  In the view I am showing below, the value type is just "string" (not "valueString"), so that is different from what I described back in 2020. Nonetheless, it is the {{UserPrincipalName}} area which I was referring to that takes semi-colon-delimited UPNs:

        I should state, I'm a little out of touch on this topic right now and it is 5 years later so things may have changed some.  I'm scratching my head on this one a little bit trying to remember the exact use case I had.  I feel like it must have been a decidated app configuration profile to deploy to a specific set of users who need to have a specific additional mailbox(es) added to their mobile Outlook.  Hope this answer clears up what you were after.

    • JohannesW60's avatar
      JohannesW60
      Copper Contributor

      JeremyTBradshaw 

       

      Hi Jeremy,

       

      i've tried to enter the value for the key com.microsoft.intune.mam.AllowedAccountUPNs as described: {{userprincipalname}} , but i get the following error message:

       

      The other keys / values:

       

      Do you have any idea about this?

       

       

      Regards,

      Hannes

      • JeremyTBradshaw's avatar
        JeremyTBradshaw
        Steel Contributor
        Based in the error, it seems like it's saying you shouldn't be using the key at all. In the Configuration Designer, do you see work accounts only mode being turned on? I haven't seen the error you shared but I'm wondering if you have to use another key to make sure he feature is in, before you can supply the allowed UPNs list

        FYI, I've been relying on full access permissions and the "add shared or delegated mailboxes" feature. So I just leave the default value for that key when I turn in on work accounts only mode.

Resources