Create an enterprise

An Enterprise resource binds an organization to your Android Management solution. Devices and Policies both belong to an enterprise. Typically, a single enterprise resource is associated with a single organization. However, you can create multiple enterprises for the same organization based on their needs. For example, an organization may want separate enterprises for its different departments or regions.

The basic steps of how to create an enterprise are described in the Quickstart guide. This page outlines the process in more detail.

1. Retrieve the sign up url

Call signupUrls.create to retrieve the sign up URL. You need to specify two parameters:

  • callbackUrl: An https URL the setup wizard redirects to after enterprise sign up is complete. This is typically your management console.
  • projectId: Your project ID.

The response contains a url and name. Open the url and take note of the name.

2. Enterprise IT admin completes the sign up flow

The url guides end users through the enterprise sign-up process. They need a Gmail account that's not already associated with an enterprise. After successfully registering their enterprise, the sign-up flow redirects to your callbackUrl. An enterpriseToken is appended to the callbackUrl.

Example

https://example.com/?enterpriseToken=EAH2pBTtGCs2K28dqhq5uw0uCyVzYMqGivap4wdlH7KNlPtCmlC8uyl

3. Create an enterprise

To create an enterprise, call enterprises.create. In addition to creating a unique enterprise ID, this method allows you to define certain enterprise-specific settings. For instance, you can set the predominant color displayed during device provisioning (primaryColor), along with the name or title (enterpriseDisplayName) and logo (logo) that’s shown to end users.

Example

The following examples uses the Java client library to create an enterprise and return its name. See the sample page for more details about using the library.

private String createEnterprise(AndroidManagement androidManagementClient)
    throws IOException {
  SignupUrl signupUrl =
      androidManagementClient
          .signupUrls()
          .create()
          .setProjectId("myProject")
          .setCallbackUrl("https://example.com/myEmmConsole")
          .execute();

  String enterpriseToken = displayUrlToAdmin(signupUrl.getUrl());

  Enterprise enterprise =
      androidManagementClient
          .enterprises()
          .create(new Enterprise())
          .setProjectId("myProject")
          .setSignupUrlName(signupUrl.getName())
          .setEnterpriseToken(enterpriseToken)
          .execute();

  return enterprise.getName();
}

/**
 * Displays the signup URL to the admin and returns the enterprise token which
 * is generated after the admin goes through the signup flow. This functionality
 * must be implemented by your management console.
 */
private String displayUrlToAdmin(String url) {
  ...
}

Send feedback about...

Android Management API (beta)
Android Management API (beta)