# List Account Federation Policies

Launch stage: GA

`GET /api/2.0/accounts/{account_id}/federationPolicies`

List account federation policies.

API scopes: authentication

## Path parameters

- `account_id` (string, optional)
  The account id for the federation policy.

## Query parameters

- `service_principal_id` (int64, optional)
  The service principal id for the federation policy.
- `page_size` (int32, optional)
- `page_token` (string, optional)

## Returns

- `policies` (array of object, optional)
  - `name` (string, optional)
    Resource name for the federation policy. Example values include
     `accounts/<account-id>/federationPolicies/my-federation-policy` for Account Federation Policies, and
     `accounts/<account-id>/servicePrincipals/<service-principal-id>/federationPolicies/my-federation-policy`
     for Service Principal Federation Policies. Typically an output parameter, which does not need to be
     specified in create or update requests. If specified in a request, must match the value in the
     request URL.
  - `description` (string, optional)
    Description of the federation policy.
    Example: `My federation policy description.`
  - `oidc_policy` (object, required)
    - `issuer` (string, optional)
      The required token issuer, as specified in the 'iss' claim of federated tokens.
      Example: `https://myidp.example.com/oidc`
    - `subject` (string, optional)
      The required token subject, as specified in the subject claim of federated tokens.
       Must be specified for service principal federation policies. Must not be specified
       for account federation policies.
    - `audiences` (array of string, optional)
      The allowed token audiences, as specified in the 'aud' claim of federated tokens.
       The audience identifier is intended to represent the recipient of the token.
       Can be any non-empty string value. As long as the audience in the token matches
       at least one audience in the policy, the token is considered a match. If audiences
       is unspecified, defaults to your <Databricks> account id.
      Example: `databricks`
    - `subject_claim` (string, optional)
      The claim that contains the subject of the token. If unspecified, the default value
       is 'sub'.
      Example: `sub`
    - `jwks_uri` (string, optional)
      URL of the public keys used to validate the signature of federated tokens, in
       JWKS format. Most use cases should not need to specify this field. If jwks_uri
       and jwks_json are both unspecified (recommended), <Databricks> automatically
       fetches the public keys from your issuer’s well known endpoint. Databricks
       strongly recommends relying on your issuer’s well known endpoint for discovering
       public keys.
    - `jwks_json` (string, optional)
      The public keys used to validate the signature of federated tokens, in JWKS format.
       Most use cases should not need to specify this field. If jwks_uri and jwks_json
       are both unspecified (recommended), <Databricks> automatically fetches the public
       keys from your issuer’s well known endpoint. Databricks strongly recommends
       relying on your issuer’s well known endpoint for discovering public keys.
  - `create_time` (string, optional)
    Creation time of the federation policy.
  - `update_time` (string, optional)
    Last update time of the federation policy.
  - `uid` (string, optional)
    Unique, immutable id of the federation policy.
  - `service_principal_id` (int64, optional)
    The service principal ID that this federation policy applies to. Output only. Only set for service principal federation policies.
  - `policy_id` (string, optional)
    The ID of the federation policy. Output only.
- `next_page_token` (string, optional)

## Response

```json
{
  "policies": [
    {
      "name": "string",
      "description": "My federation policy description.",
      "oidc_policy": {},
      "create_time": "string",
      "update_time": "string",
      "uid": "string",
      "service_principal_id": 0,
      "policy_id": "string"
    }
  ],
  "next_page_token": "string"
}
```

