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

# plugins

# `prefect_azure.plugins`

## Functions

### `set_database_connection_params` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-azure/prefect_azure/plugins.py#L23" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
set_database_connection_params(connection_url: str, settings: Any) -> Mapping[str, Any]
```

Provide Microsoft Entra ID (managed identity) auth params for Postgres.

Prefect calls this hook when building its server database engine and merges
the returned mapping into asyncpg's `connect_args`. When managed-identity auth
is enabled (`AzureSettings().postgres.managed_identity.enabled`), this returns
a `password` callable that mints a short-lived Entra token via
`DefaultAzureCredential` and an SSL context. asyncpg invokes the callable on
every new connection, so tokens refresh automatically and no database password
is required. Returns an empty mapping when the feature is disabled.

**Args:**

* `connection_url`: The database connection URL (unused; the username and host
  come from the URL Prefect already built).
* `settings`: The current Prefect settings (unused; integration settings are
  read from `AzureSettings`).

**Returns:**

* A mapping of asyncpg connection parameters to merge into `connect_args`,
* or an empty mapping when managed-identity auth is disabled.
