@dynatrace-sdk/client-iam

中文文档
1.1.0发布于 2026/11/12Apache-2.0TypeScriptESM + CJS近 30 天下载 1.4万

Identity and Access Management configuration. Allows viewing users within the platform and their access capabilities.

原始使用文档
文档目录25 节
  1. Installation
  2. Getting help
  3. License
  4. usersAndGroupsClient
  5. getActiveUserFromOrganizationalLevel
  6. getActiveUsersForOrganizationalLevel
  7. getActiveUsersForOrganizationalLevelPost
  8. getAvailableServiceUsers
  9. getVisibleGroupsForAccount
  10. getVisibleGroupsForAccountPost
  11. Types
  12. ErrorResponse
  13. ErrorResponseConstraintViolation
  14. ErrorResponseDetails
  15. ErrorThrottlingResponse
  16. PublicExceptionMessage
  17. PublicExceptionThrottlingMessage
  18. RestGroupPublic
  19. RestGroupPublicListResponse
  20. RestUserPublic
  21. RestUserPublicListResponse
  22. SearchResult
  23. ServiceUserDto
  24. Enums
  25. RestGroupPublicType

@dynatrace-sdk/client-iam

npm License

Identity and Access Management configuration. Allows viewing users within the platform and their access capabilities.

Installation

npm install @dynatrace-sdk/client-iam

Getting help

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.

API reference

Full API reference for the latest version of the SDK is also available at the Dynatrace Developer.

usersAndGroupsClient

import { usersAndGroupsClient } from '@dynatrace-sdk/client-iam';

getActiveUserFromOrganizationalLevel

usersAndGroupsClient.getActiveUserFromOrganizationalLevel(config): Promise<RestUserPublic>

Get active user from organizational level

Required scope: iam:users:read

Authorization is based on an assignment of the calling user to the account associated with the 'level-type' and 'level-id' For environment 'level-type' user has to be assigned to account to which the environment is assigned, user does not need any permissions in such environment

Parameters

NameTypeDescription
config.levelId*requiredstringIdentifier of 'level-type'. Max allowed length is 36. For account use its UUID. For environment 'level-type' user has to be assigned to account to which the environment is assigned, user does not need any permissions in such environment
config.levelType*requiredstringAllowed values: account, environment
config.uuid*requiredstringUser UUID

Returns

Return typeStatus codeDescription
RestUserPublic200User fetched successfully

Throws

Error TypeError Message
PublicExceptionMessageErrorAuthorization header is missing or is incorrect. | Execution user is not allowed to perform the action. | Calling user is not assigned to the requested account or requested environment is not assigned to account that user is assigned to or the 'level-id' does not exist
PublicExceptionThrottlingMessageErrorToo many requests have been sent - requests are throttled
Code example
import { usersAndGroupsClient } from "@dynatrace-sdk/client-iam";

const data =
  await usersAndGroupsClient.getActiveUserFromOrganizationalLevel(
    { levelType: "...", levelId: "...", uuid: "..." },
  );

getActiveUsersForOrganizationalLevel

usersAndGroupsClient.getActiveUsersForOrganizationalLevel(config): Promise<RestUserPublicListResponse>

Get active users from organizational level

Required scope: iam:users:read

Providing value for at least one of the parameters: 'partialString' or 'uuid' is required. If both query params 'partialString' and 'uuid' are provided then the result returns users meeting any of the filtering criteria. Returned users are first ordered by name and then by surname. Authorization is based on an assignment of the calling user to the account associated with the 'level-type' and 'level-id' For environment 'level-type' user has to be assigned to account to which the environment is assigned, user does not need any permissions in such environment

Parameters

NameTypeDescription
config.levelId*requiredstringIdentifier of 'level-type'. Max allowed length is 36. For account use its UUID. For environment 'level-type' user has to be assigned to account to which the environment is assigned, user does not need any permissions in such environment
config.levelType*requiredstringAllowed values: account, environment
config.pagenumberOffset-based Pagination - page. Default value: 1. Page number to return. Offset-based Pagination can't be used with Cursor-based Pagination!
config.pageKeystringCursor-based Pagination - page-key. Cursor to the next page, includes page number and filtering values. Implicit filtering values will be overwritten by page-key property. Cursor-based Pagination can't be used together with Offset-based Pagination! Max length: 2000
config.pageSizenumberPagination - page size. Default value: 1000. Minimum value: 1. Maximum value: 1000

Default: 1000
Minimum: 1
config.partialStringstringFilter value - searches for users whose email contains provided value AND users whose 'name surname' or 'surname name' starts with provided value. Minimum length: 3. Maximum length: 320
config.uuidArray<string>List of user UUIDs. Filter value - equals. Allows multiple values. Maximum allowed size: 25

Returns

Return typeStatus codeDescription
RestUserPublicListResponse200Users from the organizational level fetched successfully

Throws

Error TypeError Message
PublicExceptionMessageErrorAuthorization header is missing or is incorrect. | Execution user is not allowed to perform the action. | Calling user is not assigned to the requested account or requested environment is not assigned to account that user is assigned to or the 'level-id' does not exist
PublicExceptionThrottlingMessageErrorToo many requests have been sent - requests are throttled
Code example
import { usersAndGroupsClient } from "@dynatrace-sdk/client-iam";

const data =
  await usersAndGroupsClient.getActiveUsersForOrganizationalLevel(
    { levelType: "...", levelId: "..." },
  );

getActiveUsersForOrganizationalLevelPost

usersAndGroupsClient.getActiveUsersForOrganizationalLevelPost(config): Promise<RestUserPublicListResponse>

Get active users from organizational level

Required scope: iam:users:read

It is required to provide either request body containing list of user UUIDs or partialString. If both are provided then the result returns users meeting any of the provided criteria. Returned users are first ordered by name and then by surname. Authorization is based on an assignment of the calling user to the account associated with the 'level-type' and 'level-id' For environment 'level-type' user has to be assigned to account to which the environment is assigned, user does not need any permissions in such environment

Parameters

NameTypeDescription
config.body*requiredArray<string>
config.levelId*requiredstringIdentifier of 'level-type'. Max allowed length is 36. For account use its UUID. For environment 'level-type' user has to be assigned to account to which the environment is assigned, user does not need any permissions in such environment
config.levelType*requiredstringAllowed values: account, environment
config.pagenumberOffset-based Pagination - page. Default value: 1. Page number to return. Offset-based Pagination can't be used with Cursor-based Pagination!
config.pageKeystringCursor-based Pagination - page-key. Cursor to the next page, includes page number and filtering values. Implicit filtering values will be overwritten by page-key property. Cursor-based Pagination can't be used together with Offset-based Pagination! Max length: 2000
config.pageSizenumberPagination - page size. Default value: 1000. Minimum value: 1. Maximum value: 1000

Default: 1000
Minimum: 1
config.partialStringstringFilter value - searches for users whose email contains provided value AND users whose 'name surname' or 'surname name' starts with provided value. Minimum length: 3. Maximum length: 320

Returns

Return typeDescription
Promise<RestUserPublicListResponse>Users from the organizational level fetched successfully

Throws

Error TypeError Message
PublicExceptionMessageErrorAuthorization header is missing or is incorrect. | Execution user is not allowed to perform the action. | Calling user is not assigned to the requested account or requested environment is not assigned to account that user is assigned to or the 'level-id' does not exist
PublicExceptionThrottlingMessageErrorToo many requests have been sent - requests are throttled
Code example
import { usersAndGroupsClient } from "@dynatrace-sdk/client-iam";

const data =
  await usersAndGroupsClient.getActiveUsersForOrganizationalLevelPost(
    { levelType: "...", levelId: "...", body: ["..."] },
  );

getAvailableServiceUsers

usersAndGroupsClient.getAvailableServiceUsers(config): Promise<SearchResult>

Get active service users from organizational level which are usable by the execution user

Required scope: iam:service-users:use

Environment-level queries are executed in account context because there is no direct link between environments and service users.

Parameters

NameTypeDescription
config.levelId*requiredstringIdentifier of 'level-type'. Max allowed length is 36. For account use its UUID. For environment 'level-type' user has to be assigned to account to which the environment is assigned, user does not need any permissions in such environment
config.levelType*requiredstringAllowed values: account, environment
config.pagenumberOffset-based Pagination - page. Default value: 1. Page number to return. Offset-based Pagination can't be used with Cursor-based Pagination!
config.pageKeystringCursor-based Pagination - page-key. Cursor to the next page, includes page number and filtering values. Implicit filtering values will be overwritten by page-key property. Cursor-based Pagination can't be used together with Offset-based Pagination! Max length: 2000
config.pageSizenumberPagination - page size. Default value: 1000. Minimum value: 1. Maximum value: 1000

Minimum: 1

Returns

Return typeStatus codeDescription
SearchResult200Active service users from the organizational level filtered by user permissions fetched successfully

Throws

Error TypeError Message
PublicExceptionMessageErrorAuthorization header is missing or is incorrect. | Execution user is not allowed to perform the action. | The 'level-id' param does not exist
PublicExceptionThrottlingMessageErrorToo many requests have been sent - requests are throttled
Code example
import { usersAndGroupsClient } from "@dynatrace-sdk/client-iam";

const data =
  await usersAndGroupsClient.getAvailableServiceUsers({
    levelType: "...",
    levelId: "...",
  });

getVisibleGroupsForAccount

usersAndGroupsClient.getVisibleGroupsForAccount(config): Promise<RestGroupPublicListResponse>

Get visible groups from organizational level

Required scope: iam:groups:read

Providing value for at least one of the parameters: 'partialGroupName' or 'uuid' is required. If both query params 'partialGroupName' and 'uuid' are provided then the result will be all of the groups meeting any of the filtering criteria. Authorization is based on an assignment of the calling user to the account associated with the 'level-type' and 'level-id' For environment 'level-type' user has to be assigned to account to which the environment is assigned, user does not need any permissions in such environment

Parameters

NameTypeDescription
config.levelId*requiredstringIdentifier of 'level-type'. Max allowed length is 36. For account use its UUID. For environment 'level-type' user has to be assigned to account to which the environment is assigned, user does not need any permissions in such environment
config.levelType*requiredstringAllowed values: account, environment
config.pagenumberOffset-based Pagination - page. Default value: 1. Page number to return. Offset-based Pagination can't be used with Cursor-based Pagination!
config.pageKeystringCursor-based Pagination - page-key. Cursor to the next page, includes page number and filtering values. Implicit filtering values will be overwritten by page-key property. Cursor-based Pagination can't be used together with Offset-based Pagination! Max length: 2000
config.pageSizenumberPagination - page size. Default value: 1000. Minimum value: 1. Maximum value: 1000

Default: 1000
Minimum: 1
config.partialGroupNamestringFilter value - contains. Minimum length: 3. Maximum length: 320
config.uuidArray<string>List of group UUIDs. Filter value - equals. Allows definition of multiple values. Maximum allowed size: 10

Returns

Return typeStatus codeDescription
RestGroupPublicListResponse200Groups from the level fetched successfully

Throws

Error TypeError Message
PublicExceptionMessageErrorMissing both 'partialGroupName' and 'uuid' filter values, or the values don't meet the requirements. | Authorization header is missing or is incorrect. | Execution user is not allowed to perform the action. | Calling user is not assigned to the requested account or requested environment is not assigned to account that user is assigned to or the 'level-id' does not exist
PublicExceptionThrottlingMessageErrorToo many requests have been sent - requests are throttled
Code example
import { usersAndGroupsClient } from "@dynatrace-sdk/client-iam";

const data =
  await usersAndGroupsClient.getVisibleGroupsForAccount({
    levelType: "...",
    levelId: "...",
  });

getVisibleGroupsForAccountPost

usersAndGroupsClient.getVisibleGroupsForAccountPost(config): Promise<RestGroupPublicListResponse>

Get visible groups from organizational level

Required scope: iam:groups:read

It is required to provide at either request body containing list of group uuids or partialGroupName. If both are provided then the result returns groups meeting any of the provided criteria. Authorization is based on an assignment of the calling user to the account associated with the 'level-type' and 'level-id' For environment 'level-type' user has to be assigned to account to which the environment is assigned, user does not need any permissions in such environment

Parameters

NameTypeDescription
config.body*requiredArray<string>
config.levelId*requiredstringIdentifier of 'level-type'. Max allowed length is 36. For account use its UUID. For environment 'level-type' user has to be assigned to account to which the environment is assigned, user does not need any permissions in such environment
config.levelType*requiredstringAllowed values: account, environment
config.pagenumberOffset-based Pagination - page. Default value: 1. Page number to return. Offset-based Pagination can't be used with Cursor-based Pagination!
config.pageKeystringCursor-based Pagination - page-key. Cursor to the next page, includes page number and filtering values. Implicit filtering values will be overwritten by page-key property. Cursor-based Pagination can't be used together with Offset-based Pagination! Max length: 2000
config.pageSizenumberPagination - page size. Default value: 1000. Minimum value: 1. Maximum value: 1000

Default: 1000
Minimum: 1
config.partialGroupNamestringFilter value - contains. Minimum length: 3. Maximum length: 320

Returns

Return typeDescription
Promise<RestGroupPublicListResponse>Groups from the level fetched successfully

Throws

Error TypeError Message
PublicExceptionMessageErrorMissing both 'partialGroupName' and 'uuid' filter values, or the values don't meet requirements. | Authorization header is missing or is incorrect. | Execution user is not allowed to perform the action. | Calling user is not assigned to the requested account or requested environment is not assigned to account that user is assigned to or the 'level-id' does not exist
PublicExceptionThrottlingMessageErrorToo many requests have been sent - requests are throttled
Code example
import { usersAndGroupsClient } from "@dynatrace-sdk/client-iam";

const data =
  await usersAndGroupsClient.getVisibleGroupsForAccountPost(
    { levelType: "...", levelId: "...", body: ["..."] },
  );

Types

ErrorResponse

NameType
codenumber
detailsErrorResponseDetails
messagestring

ErrorResponseConstraintViolation

NameType
messagestring
parameterLocationstring
pathstring

ErrorResponseDetails

NameType
constraintViolationsArray<ErrorResponseConstraintViolation>
missingScopesArray<string>

ErrorThrottlingResponse

NameType
codenumber
messagestring
retryAfterSecondsnumber

PublicExceptionMessage

NameType
errorErrorResponse

PublicExceptionThrottlingMessage

NameType
errorErrorThrottlingResponse

RestGroupPublic

Collection containing the paginated result

NameType
groupName*requiredstring
type*required"LOCAL" | "ALL_USERS" | "SCIM" | "SAML"
uuid*requiredstring

RestGroupPublicListResponse

NameTypeDescription
nextPageKeystringKey for requesting the next page of the result
resultsArray<RestGroupPublic>Collection containing the paginated result
totalCountnumberTotal count of records

RestUserPublic

Collection containing the paginated result

NameType
descriptionstring
email*requiredstring
namestring
surnamestring
uid*requiredstring

RestUserPublicListResponse

NameTypeDescription
nextPageKeystringKey for requesting the next page of the result
resultsArray<RestUserPublic>Collection containing the paginated result
totalCountnumberTotal count of records

SearchResult

NameTypeDescription
nextPageKeystringKey for requesting the next page of the result
resultsArray<ServiceUserDto>Collection containing the paginated result
totalCountnumberTotal count of records

ServiceUserDto

Collection containing the paginated result

NameType
createdAtDate
descriptionstring
emailstring
namestring
surnamestring
uidstring

Enums

RestGroupPublicType

⚠️ Deprecated Use literal values.

Enum keys

AllUsers | Local | Saml | Scim

版本与发布记录

@dynatrace-sdk/client-iam 共发布 2 个版本,首次发布于 2026/02/19;过去 12 个月发布了 2 个版本。

版本发布日期距今
1.1.0latest2026/11/121 天前
1.0.02026/02/198 个月前

关于 @dynatrace-sdk/client-iam 的常见问题

@dynatrace-sdk/client-iam 是什么?

Identity and Access Management configuration. Allows viewing users within the platform and their access capabilities.

如何安装 @dynatrace-sdk/client-iam?

在项目目录运行 npm install @dynatrace-sdk/client-iam,或使用 pnpm add / yarn add / bun add。

@dynatrace-sdk/client-iam 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@dynatrace-sdk/client-iam 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@dynatrace-sdk/client-iam 可以商用吗?

@dynatrace-sdk/client-iam 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@dynatrace-sdk/client-iam 的下载量有多少?

根据 npm 官方下载统计,@dynatrace-sdk/client-iam 在 2026/10/13 – 2026/11/11 这 30 天内被下载 13,689 次,日均约 456 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dynatrace-sdk/client-iam 还在维护吗?

最新版本 1.1.0 发布于 2026/11/12(1 天前);至今共发布 2 个版本,其中过去 12 个月发布了 2 个;首次发布于 2026/02/19。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。