Forum Discussion

rahulkumarjc's avatar
rahulkumarjc
Level 1.5: Cupcake
2 months ago

Not able to restrict personal email from logging into Work GMAIL app for BYOD enrolled devices

I wanted to restrict personal emails (with gmail account) from logging into Work GMAIL app for BYOD enrolled devices. I however want workspace accounts to be able to login. When I set modifyAccountsDisabled to true in AMAPI policy, no account can be added (including workspace account). Same problem happens when I specify com.google for accountTypesWithManagementDisabled - no account can log into GMAIL.

Is there any solution to this ? Thanks in advance.

2 Replies

  • Moombas's avatar
    Moombas
    Level 4.4: KitKat
    2 months ago

    Currently i don't have BYOD devices being managed but ever tried adding gmail as a wark app to the device with managed app config?

    So, combination would be "username" filled in (should be somehow a macro) and disabling "allow
    unmanaged accounts" setting.

    Screenshots taken from Mobicontrol.

    • rahulkumarjc's avatar
      rahulkumarjc
      Level 1.5: Cupcake
      2 months ago

      No, unfortunately I couldn't make it work. Not sure if I need to configure exchange server. If it works for you, can you please provide me the policy JSON ? Below is my policy JSON -

      {
          "applications": [
              {
                  "packageName": "com.google.android.gm",
                  "installType": "FORCE_INSTALLED",
                  "defaultPermissionPolicy": "PROMPT",
                  "managedConfigurationTemplate": {
                      "templateId": "15655048322358951452",
                      "configurationVariables": {
                          "$username$": "kishor"
                      }
                  },
                  "autoUpdateMode": "AUTO_UPDATE_DEFAULT"
              }
          ],
          "statusReportingSettings": {
              "applicationReportsEnabled": true,
              "deviceSettingsEnabled": true,
              "softwareInfoEnabled": true,
              "memoryInfoEnabled": true,
              "networkInfoEnabled": true,
              "displayInfoEnabled": true,
              "powerManagementEventsEnabled": true,
              "hardwareStatusEnabled": true,
              "systemPropertiesEnabled": true,
              "applicationReportingSettings": {
                  "includeRemovedApps": true
              },
              "commonCriteriaModeEnabled": true
          }
      }


      And this is how it looks like on my mobile - 




       

      Regards

      Rahul Kumar