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

# Pass Parameters to Identity Providers

> Learn how to control login behavior with a social or enterprise identity provider by passing query parameters from your Auth0 application during the authorize request.

You can pass provider-specific parameters to an Identity Provider (Identity Provider (IdP): Service that stores and manages digital identities.) (IdP) during authentication. The values can either be static per connection or dynamic per user.

## Limitations

For this configuration, be aware of the following restrictions:

* Only [valid OAuth 2.0/OIDC parameters](http://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) are accepted.
* Not all IdPs support upstream parameters. Check with the specific IdP before you proceed with your implementation.
* SAML (Security Assertion Markup Language (SAML): Standardized protocol allowing two parties to exchange authentication information without a password.) IdPs do not support upstream parameters.

## Static parameters

Use static parameters to configure your connection to send a standard set of parameters to the IdP when a user logs in.

To configure static parameters, call the Auth0 Management API (Management API: A product to allow customers to perform administrative tasks.) [Create a connection](/docs/docs/api/management/v2/#!/Connections/post_connections) or [Update a connection](/docs/docs/api/management/v2/#!/Connections/patch_connections_by_id) endpoint, and pass the `upstream_params` object in the `options` object with the parameters you'd like to send to the IdP.

### Example: WordPress

WordPress allows you to pass an optional `blog` parameter to its OAuth 2.0 (OAuth 2.0: Authorization framework that defines authorization protocols and workflows.) authorization endpoint, and automatically request access to a specified blog for users when they log in. To learn more, read [WordPress's OAuth 2.0 documentation](https://developer.wordpress.com/docs/oauth2/).

To follow this example, you'll need a working [WordPress Social connection](https://marketplace.auth0.com/integrations/wordpress-social-connection).

#### Get the connection

Call the Management API [Get a connection](/docs/docs/api/management/v2/connections/get-connections-by-id) endpoint to retrieve the existing values of the `options` object:

Using the Auth0 CLI? If you haven't already, [set up and authenticate your CLI session](/docs/docs/deploy-monitor/auth0-cli) before running this command.

The `options` object will look similar to:

```json lines theme={null}
{
  "options": {
    "client_id": "", 
    "profile": true, 
    "scope": ["profile"]
  }
}
```

#### Update the connection (static)

Copy the existing `options` object, and then add the `upstream_params` object with the `blog` field as an attribute:

```json lines theme={null}
{
  "options": {
    "client_id": "", 
    "profile": true, 
    "scope": ["profile"],
    "upstream_params": {
      "blog": {"value":"myblog.wordpress.com"}
    }
  }
}
```

Call the Management API [Update a connection](/docs/docs/api/management/v2/#!/Connections/patch_connections_by_id) endpoint with the `options` object in the body:

Now every time a user authenticates with this connection, the request to the Wordpress authorization endpoint will include the query parameter `blog=myblog.wordpress.com`.

## Dynamic parameters

Use dynamic parameters to configure your connection to send a set of parameters with values specific to the user to the IdP when they log in.

To configure dynamic parameters, call the Auth0 Management API [Create a connection](/docs/docs/api/management/v2/#!/Connections/post_connections) or [Update a connection](/docs/docs/api/management/v2/#!/Connections/patch_connections_by_id) endpoint, pass the `upstream_params` object in the `options` object with the parameters you'd like to send to the IdP, and specify the field that the parameter maps to with the `alias` attribute.

Here's a sample `options` object that we'll revisit later in the X example:

```json lines theme={null}
{
  "options": {
    "upstream_params": {
      "screen_name": {
        "alias": "login_hint"
      }
    }
  }
}
```

### Available fields

These are the available fields for the `alias` attribute:

* `acr_values`
* `audience`
* `client_id`
* `display`
* `id_token_hint`
* `login_hint`
* `max_age`
* `prompt`
* `resource`
* `response_mode`
* `response_type`
* `ui_locales`

### Example: X

X allows you to pass an optional `screen_name` parameter to its OAuth authorization endpoint. The `screen_name` parameter pre-fills the username input box of the login screen with the given value. To learn more, read [X's API reference](https://docs.x.com/fundamentals/authentication/api-reference#get-oauth%2Fauthorize).

To follow this example, you'll need a working [X Social connection](https://marketplace.auth0.com/integrations/twitter-social-connection).

#### Get the connection

Call the Management API [Get a connection](/docs/docs/api/management/v2/connections/get-connections-by-id) endpoint to retrieve the existing values of the `options` object:

The `options` object will look something like this:

```text lines theme={null}
"options": {
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "profile": true
}
```

#### Update the connection (dynamic)

Copy the existing `options` object, add the `upstream_params` object with the `screen_name` field as an attribute, and then set the `alias` attribute to `login_hint`:

```json lines theme={null}
{
  "options": {
    "client_id": "", 
    "profile": true, 
    "scope": ["profile"],
    "upstream_params": {
      "screen_name": {
        "alias": "login_hint"
      }
    }
  }
}
```

Call the Management API [Update a connection](/docs/docs/api/management/v2/#!/Connections/patch_connections_by_id) endpoint with the `options` object in the body:

#### Call the login endpoint

When you call the Authentication API [Login endpoint](/docs/docs/api/authentication#login) for a user, you can pass their email address to the `login_hint` parameter:

This value will then be passed to the X authorization endpoint as the `screen_name` parameter:

```text lines theme={null}
https://api.x.com/oauth/authorize
  ?oauth_token={yourXAuthToken}
  &screen_name=user@domain.com
```
