Set up multiple organizations (environments) within a single tenant

Learn365 allows you to create multiple organizations (environments) within a single tenant. These organizations, while being under the same tenant, have different and isolated databases and API keys. Therefore, you can manage the organizations separately.

This article describes the steps to create a new organization (environment).

 

Get the access token

To view a list of existing environments and to create a new one, you’ll need the access token. To get it, follow these steps:

1. In your web browser, open the Developer Tools > Network tab and keep it open.

2. Log in to the Learn365 Admin Center.

3. In the Developer Tools > Network tab, find and select the AccessTokens request, open the Preview tab, and expand the second row. Right-click the accessToken property and select Copy Value.

 

Get the access token

 

View a list of environments

To view a list of existing environments for your tenant, send this API request:

Method: GET

URL: https://api.365.systems/services/tenants/api/v1/tenant/{{tenantId}}/environment

Path parameter:

Parameter Type Required? Description
tenantId GUID +

To get your tenant ID:

1. Log in to the Learn365 Admin Center.

2. Check the URL in the address bar of your browser. The URL has two GUIDs: the first one is the tenant ID while the second is the environment ID.

Let’s say your URL is https://test.365.systems/tenant/4654c20b93264c7
eb10c583d74976d59/env/d19794e8feb24fda8ddb7
ef054c4bd6d/global/. In this case, 4654c20b93264c7
eb10c583d74976d59 is the tenant ID you should use in this request.

 

Header: The header must include the Authorization property with the Bearer {{Access Token}} value. If you send the request via Postman, on the Authorization tab of your request:

1. In the Auth Type list, select Bearer Token.

2. Paste the access token into the Token field.

 

Use the access token in Postman

 

A successful request returns the 200 response with an array of environments in its body. Each environment contains the following parameters:

  • id: Environment ID.
  • tenantId: Tenant ID.
  • provisioningStatus: Environment status. The Finished status means the environment is active and ready to use.
  • installationStatuses: The array contains the serviceName (name of the installation service) and installationStatus (current status of the installation) parameters.
  • modifiedAt: The date and time of the last environment modification.
  • createdAt: The date and time of the environment creation.
  • modifiedByUserLogin: The Microsoft365 global admin who modified the environment last.
  • createdByUserLogin: The Microsoft365 global admin who created the environment.

The response body will look similar to this:

 

[
{
"id": "d19794e8feb24fda8ddb7ef054c4bd6d ",
"tenantId": "4654c20b93264c7eb10c583d74976d59",
"provisioningStatus": "Finished",
"installationStatuses": [
{
"serviceName": "Lms",
"installationStatus": "Finished"
}
],
"modifiedAt": "2025-01-23T12:05:27.4060578",
"createdAt": "2025-01-23T12:05:27.4060624",
"modifiedByUserLogin": "test@test.com",
"createdByUserLogin": "test@test.com"
},
]

 

Create an environment

To create an environment, send the same request you used to view a list of environments, but with the POST method instead of GET.

A successful request returns the 202 response with an empty body.

 

Check the new environment status

Since creating an environment may take some time, it’s worth tracking the environment status. To do that, send the same request you used to view a list of environments and check the response body. When the provisioningStatus is Finished, the new environment is ready to use.

 

Activate the new environment

To open the Learn365 Admin Center for the new environment, you’ll need the environment ID. You can get it by sending the same request you used to view a list of environments and checking the id parameter in the response body.

Then, you can use the environment ID to form the URL of the Learn365 Admin Center. The URL has the following structure:

https://{{Domain Name}}/tenant/{{Tenant ID}}/env/{{Environment ID}}/global

Let’s say:

  • test.365.systems is the domain name of your Learn365 Admin Center.
  • 4654c20b93264c7eb10c583d74976d59 is your tenant ID.
  • 0081fd9daaf14ec6a41768932567577e is your environment ID.

In this case, paste the following URL into your browser address bar:

https://test.365.systems/tenant/4654c20b93264c7eb10c583d74976d59/env/0081fd9daaf14ec6a41768932567577e/global

You’ll be redirected to the Organization Information page, where you’ll need to complete the information and activate the subscription for the new organization. For more information about this page, see the Subscription key activation section in this article.

After that, you can:

To control the visibility of users and user groups, including the Microsoft Entra (Azure Active Directory) groups, between organizations and course catalogs, use the group restrictions APIs.

 

Was this article helpful?
1 out of 1 found this helpful

Comments

Article is closed for comments.