> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 管理対象ユーザーの作成

export const MultiRelatedLinks = ({sections = []}) => {
  if (!sections || sections.length === 0) {
    return null;
  }
  return <div className="space-y-8">
      {sections.map((section, index) => <RelatedLinks key={index} title={section.title} items={section.items} />)}
    </div>;
};

export const RelatedLinks = ({title, items = []}) => {
  const getBadgeClass = badge => {
    if (!badge) return "badge-default";
    const badgeType = badge.toLowerCase().replace(/\s+/g, "-");
    return `badge-${badge === "ガイド" ? "guide" : badgeType}`;
  };
  if (!items || items.length === 0) {
    return null;
  }
  return <div className="my-8">
      {}
      <h3 className="text-sm font-bold uppercase tracking-wider mb-4">{title}</h3>

      {}
      <div className="flex flex-col gap-3">
        {items.map((item, index) => <a key={index} href={item.href} className="py-2 px-3 rounded related_link hover:bg-[#f2f2f2] dark:hover:bg-[#111827] flex items-center gap-3 group no-underline hover:no-underline border-b-0">
            {}
            <span className={`px-2 py-1 rounded-full text-xs font-semibold uppercase tracking-wide flex-shrink-0 ${getBadgeClass(item.badge)}`}>
              {item.badge}
            </span>

            {}
            <span className="text-base">{item.label}</span>
          </a>)}
      </div>
    </div>;
};

export const Link = ({href, children, className, ...props}) => {
  const localizedHref = localizeLink(href);
  return <a href={localizedHref} className={className} {...props}>
      {children}
    </a>;
};

新しい管理対象ユーザーを生成するには、最低でも管理対象ユーザーの名前とメールアドレスが必要になります。

<Note>
  管理対象ユーザーの作成時に指定するメールアドレスは一意である必要があります。既存のBoxユーザーにすでに関連付けられているメールアドレスは使用できません。
</Note>

<CodeGroup>
  ```sh cURL theme={null}
  curl -i -X POST "https://api.box.com/2.0/users" \
       -H "authorization: Bearer <ACCESS_TOKEN>" \
       -H "content-type: application/json" \
       -d '{
         "login": "ceo@example.com",
         "name": "Aaron Levie"
       }'
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await client.users.createUser({
    name: userName,
    login: userLogin,
    isPlatformAccessOnly: true,
  } satisfies CreateUserRequestBody);
  ```

  ```python Python v10 theme={null}
  client.users.create_user(user_name, login=user_login, is_platform_access_only=True)
  ```

  ```cs .NET v10 theme={null}
  await client.Users.CreateUserAsync(requestBody: new CreateUserRequestBody(name: userName) { Login = userLogin, IsPlatformAccessOnly = true });
  ```

  ```swift Swift v10 theme={null}
  try await client.users.createUser(requestBody: CreateUserRequestBody(name: userName, login: userLogin, isPlatformAccessOnly: true))
  ```

  ```java Java v10 theme={null}
  client.getUsers().createUser(new CreateUserRequestBody.Builder(userName).login(userLogin).isPlatformAccessOnly(true).build())
  ```

  ```java Java v5 theme={null}
  BoxUser.Info createdUserInfo = BoxUser.createEnterpriseUser(api, "user@example.com", "A User");
  ```

  ```python Python v4 theme={null}
  new_user = client.create_user('Temp User', 'user@example.com')
  ```

  ```cs .NET v6 theme={null}
  var userParams = new BoxUserRequest()
  {
      Name = "Example User",
      Login = "user@example.com"
  };
  BoxUser newUser = await client.UsersManager.CreateEnterpriseUserAsync(userParams);
  ```

  ```javascript Node v4 theme={null}
  client.enterprise.addUser(
  	'eddard@winterfell.example.com',
  	'Ned Stark',
  	{
  		role: client.enterprise.userRoles.COADMIN,
  		address: '555 Box Lane',
  		status: client.enterprise.userStatuses.CANNOT_DELETE_OR_EDIT
  	})
  	.then(user => {
  		/* user -> {
  			type: 'user',
  			id: '44444',
  			name: 'Ned Stark',
  			login: 'eddard@winterfell.example.com',
  			created_at: '2012-11-15T16:34:28-08:00',
  			modified_at: '2012-11-15T16:34:29-08:00',
  			role: 'coadmin',
  			language: 'en',
  			timezone: 'America/Los_Angeles',
  			space_amount: 5368709120,
  			space_used: 0,
  			max_upload_size: 2147483648,
  			status: 'active',
  			job_title: '',
  			phone: '',
  			address: '555 Box Lane',
  			avatar_url: 'https://www.box.com/api/avatar/large/deprecated' }
          */
  	});
  ```
</CodeGroup>

App Userの作成時に設定できるすべての使用可能なオプションパラメータを確認するには、<Link href="/reference/post-users">ユーザーを作成</Link>エンドポイントを参照してください。

<Note>
  新しく作成したアカウントを変更できるようにするには、受信した確認メールにあるリンクをクリックする必要があります。
</Note>

ユーザー作成リクエストから、ユーザーオブジェクトが返されます。このユーザーオブジェクトには管理対象ユーザーのIDが含まれています。これは、今後ユーザーを変更するAPIリクエストを実行するために使用できます。

新しい管理対象ユーザーが作成されると、使用されているメールアドレス宛てに、アカウントのパスワードの作成を求めるメールがBoxから届きます。このアクションが実行されるまで、アカウントは`pending`状態になります。

<Note>
  セキュリティ上の理由から、新しい管理対象ユーザーの作成時にパスワードを指定することはできません。
</Note>

<RelatedLinks
  title="関連するAPI"
  items={[
{ label: translate("Create user"), href: "/reference/post-users", badge: "POST" }
]}
/>

<RelatedLinks
  title="関連するガイド"
  items={[
{ label: translate("Create App User"), href: "/guides/users/create-app-user", badge: "GUIDE" },
{ label: translate("Deprovision Users"), href: "/guides/users/deprovision/index", badge: "GUIDE" },
{ label: translate("Transfer Files & Folders"), href: "/guides/users/deprovision/transfer-folders", badge: "GUIDE" }
]}
/>
