Use Management API and Subscription API together to manage user access and assignments to your projects under a specified subscription.With Subscription API, you can:
Retrieve a dynamically paginated list of projects under the specified subscription.
A dynamically paginated list of projects in the subscription.
Retrieve a dynamically paginated list of users under the specified subscription. Includes the users' assignment to projects, environments, collections, roles, and languages.
A dynamically paginated list of users in the subscription.
Retrieve metadata about a specified user under the specified subscription. The metadata includes information about the user's access to projects and environments, and content in specific collections, roles, and languages.
A single user object.
Activates the specified user in all projects under the specified subscription.
The user was activated in all projects under the specified subscription.
Deactivates the specified user in all projects under the specified subscription.
User was deactivated in all projects of your subscription.
Identifies your subscription.
Determines the page of results to retrieve.To get the next page of results, check the pagination object in the API response and set the x-continuation header parameter to the value of the continuation_token property.
List of projects.
Identifies your subscription.
Determines the page of results to retrieve.To get the next page of results, check the pagination object in the API response and set the x-continuation header parameter to the value of the continuation_token property.
The list of users in projects under the specified subscription.
Identifies your subscription.
Identifies the user by their internal ID (e.g., mB9I0b-n-Zhe-x2my4NPjJovOiE0cqKgIyuVjqfKyW0) or email (e.g., email/user@example.com).
The user's internal ID.
The user's first name.
The user's last name.
Identifies your subscription.
Identifies the user by their internal ID (e.g., mB9I0b-n-Zhe-x2my4NPjJovOiE0cqKgIyuVjqfKyW0) or email (e.g., email/user@example.com).
Identifies your subscription.
Identifies the user by their internal ID (e.g., mB9I0b-n-Zhe-x2my4NPjJovOiE0cqKgIyuVjqfKyW0) or email (e.g., email/user@example.com).
Information about the next page of results.
Subscription management | Kontent.ai Learn
Information about the next page of results.
The user's email address.
A flag determining whether the user has any pending invitation to a project.
// Tip: Find more about .NET SDKs at https://kontent.ai/learn/netusing Kontent.Ai.Management;var client = new ManagementClient(new ManagementOptions{ ApiKey = "KONTENT_AI_MANAGEMENT_API_KEY", EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID"});var identifier = UserIdentifier.ByEmail("user@kontent.ai");//var identifier = UserIdentifier.ById("d94bc87a-c066-48a1-a910-4f991ccc1fb5");await client.ActivateSubscriptionUserAsync(identifier);
400
404
{ "request_id": "02e2f665c547564d", "error_code": 229, "message": "The user 'sso_32c0ad0f-4f5e-4c4c-96ea-d1ed41024d79' is a subscription admin. They cannot be activated or deactivated in all projects."}
C#
cURL
// Tip: Find more about .NET SDKs at https://kontent.ai/learn/netusing Kontent.Ai.Management;var client = new ManagementClient(new ManagementOptions{ ApiKey = "KONTENT_AI_MANAGEMENT_API_KEY", EnvironmentId = "KONTENT_AI_ENVIRONMENT_ID"});var identifier = UserIdentifier.ByEmail("user@kontent.ai");//var identifier = UserIdentifier.ById("d94bc87a-c066-48a1-a910-4f991ccc1fb5");await client.DeactivateSubscriptionUserAsync(identifier);
400
404
{ "request_id": "02e2f665c547564d", "error_code": 229, "message": "This user with ID '5bbf48135624682e96bb8c21' is subscription admin and cannot be activated or deactivated in all projects."}