---
title: "Import selected available ldap users."
method: POST
path: "/ldap/users/import"
tags: ["Ldap"]
---

# Import selected available ldap users.

`POST /ldap/users/import`

This endpoint adds the selected available ldap users to harbor based on related configuration parameters from the system. System will try to guess the user email address and realname, add to harbor user information. If have errors when import user, will return the list of importing failed uid and the failed reason.

## Headers

- `X-Request-Id` string

## Request body

- LdapImportUsers
  - `ldap_uid_list` string[] — selected uid list

## Response `200`

Add ldap users successfully.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Failed import some users.
- `500` — Internal server error

---

[API](https://skmtc.dev/goharbor/apis/harbor-api.md) · [All operations](https://skmtc.dev/goharbor/apis/harbor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/goharbor/harbor-api/revisions/62d78801f8df/schema)
