
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
@itwin/access-control-client
Advanced tools
A comprehensive TypeScript library for Bentley Systems' Access Control API, providing type-safe access to iTwin access management, roles, permissions, groups, and member operations.
Get up and running with Access Control Client in just a few steps:
npm install @itwin/access-control-client
import { AccessControlClient } from "@itwin/access-control-client";
const client = new AccessControlClient();
const accessToken = "your-access-token-string";
const roles = await client.roles.getITwinRoles(accessToken, "itwin-id");
console.log(`Found ${roles.data!.length} roles`);
# Using npm
npm install @itwin/access-control-client
# Using yarn
yarn add @itwin/access-control-client
# Using pnpm
pnpm add @itwin/access-control-client
All API methods require an access token string. See the iTwin Platform documentation for authentication setup.
Configure different deployment environments using globalThis.IMJS_URL_PREFIX:
// Development environment
globalThis.IMJS_URL_PREFIX = "dev-";
// QA environment
globalThis.IMJS_URL_PREFIX = "qa-";
// Production (default)
globalThis.IMJS_URL_PREFIX = undefined;
| Document | Purpose |
|---|---|
| Getting Started Guide | Complete setup and first steps |
| Migration Guide v3→v4 | Upgrading from v3.x to v4.x |
| Contributing Guide | Development and contribution workflow |
AccessControlClient - Main client for all access control operationsIAccessControlClient - Interface defining the client API surfaceThe AccessControlClient exposes the following specialized sub-clients:
permissions - Query permissions across the platform and iTwinsroles - Manage iTwin roles (CRUD operations)groups - Manage iTwin groups (CRUD operations)groupMembers - Manage members within groupsgroupMemberInvitations - Handle group member invitation lifecycleuserMembers - Manage individual user members of iTwinsownerMembers - Manage iTwin owner membershipsmemberInvitations - Handle member invitation lifecycleitwinJobs - Bulk operations for member managementitwinShares - Manage iTwin sharing and access tokensimport { AccessControlClient } from "@itwin/access-control-client";
import type {
BentleyAPIResponse,
Role,
MultipleUserMembersResponse
} from "@itwin/access-control-client";
const client = new AccessControlClient();
const accessToken = "your-access-token-string";
const iTwinId = "your-itwin-id";
// Get roles
const roles = await client.roles.getITwinRoles(accessToken, iTwinId);
// Create a role
const newRole = await client.roles.createITwinRole(accessToken, iTwinId, {
displayName: "Project Manager",
description: "Role for project management"
});
// Query user members
const members = await client.userMembers.queryITwinUserMembers(
accessToken,
iTwinId,
{ top: 10 }
);
// Add user members
const addedMembers = await client.userMembers.addITwinUserMembers(
accessToken,
iTwinId,
[{
email: "user@example.com",
roleIds: ["role-id"]
}],
"Welcome message"
);
The @itwin/access-control-client package provides a modern, type-safe interface to Bentley Systems' Access Control API. It manages iTwin access permissions, roles, groups, members, invitations, and sharing capabilities.
For more information about the iTwin platform and APIs, visit:
git clone https://github.com/iTwin/access-control-client.git
cd access-control-client
pnpm install
pnpm build
.env file setup is required for tests. View Getting Started for more information.
# Run all tests
pnpm test
# Run tests with coverage
pnpm test:coverage
# Run linting
pnpm lint
We welcome contributions! Please see our Contributing Guide for details on:
This project uses Changesets for version management. For more information view Contributing Guide.
Copyright © Bentley Systems, Incorporated. All rights reserved.
This project is licensed under the MIT License - see the LICENSE.md file for details.
FAQs
Access control client for the iTwin platform
We found that @itwin/access-control-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.