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

# Database/AD/LDAP (Active)

> データベース、AD、LDAP 接続向けのアクティブ認証エンドポイントは非推奨です。代わりに Resource Owner Password grant を使用してください。

## エンドポイント

`POST /oauth/ro`

> [!NOTE]
>
> このエンドポイントは従来の認証パイプラインの一部であり、現在は [Password Grant](#resource-owner-password) に置き換えられています。最新の認証パイプラインについて詳しくは、[Introducing OIDC Conformant Authentication](/docs/api-auth/intro) を参照してください。

このエンドポイントは、API ベースの (アクティブな) 認証に使用します。ユーザーの認証情報と指定された `接続` に基づいて、プロバイダー側で認証を実行し、アクセストークンと ID トークンを含む JSON を返します。

### 備考

* このエンドポイントは、データベース接続、パスワードレス接続、Active Directory/LDAP、Windows Azure AD、および ADFS でのみ利用できます。

* パッシブ認証とアクティブ認証の主な違いは、前者はブラウザーで [Auth0 Login Page](http://manage.auth0.com/login) を通じて行われるのに対し、後者はどこからでも (スクリプト、サーバー間通信などから) 呼び出せる点です。

* サンプルの auth0.js スクリプトでは、ライブラリのバージョン 8 を使用しています。auth0.js バージョン 7 をお使いの場合は、この[リファレンスガイド](https://auth0.com/docs/libraries/auth0js/v7)をご覧ください。

### 詳細

* [データベース ID プロバイダー](https://auth0.com/docs/authenticate/database-connections)
* [ユーザー名/パスワード認証のレート制限](https://auth0.com/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy)
* [Active Directory/LDAP Connector](https://auth0.com/docs/authenticate/identity-providers/enterprise-identity-providers/active-directory-ldap/ad-ldap-connector)

## ボディパラメータ

**client\_id** `string` *required*

アプリケーションの`client_id`です。

**username** `string` *required*

ログインするユーザーのユーザー名またはメールアドレスです。

**password** `string` *required*

ログインするユーザーのパスワードです。

**connection** `string` *required*

ログインに使用する接続名です。

**scope** `string`

IDトークンも取得するには、`openid`を設定します。

**grant\_type** `string` *required*

`password`または`urn:ietf:params:oauth:grant-type:jwt-bearer`を設定します。

**device** `string`

`grant_type`が`urn:ietf:params:oauth:grant-type:jwt-bearer`の場合に必須です。

**id\_token** `string`

`grant_type`が`urn:ietf:params:oauth:grant-type:jwt-bearer`の場合に必須です。

## レスポンススキーマ

200

\{}

application/json

**id\_token** `string`

IDトークン。

**access\_token** `string`

アクセストークン。

**token\_type** `string`

トークンの種類。通常は `Bearer` です。

400

\{}

application/json

**error** `string`

エラーコード。

**error\_description** `string`

エラーの説明。

## レスポンスメッセージ

| ステータス | 説明 |
| - | - |
| 200 | 認証成功時のレスポンス |
| 400 | 不正なリクエスト |
