Search code examples
google-apis-explorerandroid-management-api

Android Management API: List of Enterprises/Policies?


This is driving me nuts. I've successfully followed the Android Management API Quickstart to create a project/enterprise/policy and install it on a device.

I stupidly didn't write down the enterprise or policy IDs. I tried to create a new set, but the non-enterprise email now gives an error that it's already part of another EMM.

Is there a place in the console where I can see a list of the enterprises and/or policies that I've created? Where are these stored?

Edit: I found the enterprises.get method in the API but if I put enterprises/* in the name field (per the validation) I get a 400 error indicating Invalid enterprise id. Provide a valid id. so I'm unsure how to move forward.


Solution

  • You can find the enterprise you created by logging into play.google.com/work with the account that was used to create it.

    Click on Admin Settings to see the Organization name and Organization ID

    Admin Settings

    And to find the policies of all the devices you have enrolled to this enterprise, you can simply call the API - enterprises.devices.list entering the parent in the form enterprises/{enterpriseId} [ enterpriseId here is the OrganizationID that you get from the above steps ]

    This would list all the devices attached to the enterprise and in the response you can find policyName of each device.