Azure ADF access Postgres server

239 Views Asked by At

I have Azure ADF and Postgres server, and I want to connect ADF to postgress.

Currently I am generating token to connect to Postgres server. And I'm using the same token to connect using ADF. The problem with the token is, it expires in 1 hour and so not the best solution for Production environment.

My other options is to use a local user with username and password, however that's a security risk so I don't want to approach that option yet.

Is there a way I can configure Managed Identity between ADF and postgres so I don't need to generate token every 1 hour?

1

There are 1 best solutions below

0
On

The access token has a unified lifetime in a tenant.

User uses User access token while managed identity uses Application access token.

So even if you use a managed identity, you will also need to use an access token with a one-hour lifetime.

You can consider configuring the lifetime of the access token to the time you want.

The examples for your reference.

If you insist on using managed identity to solve this problem, you can refer to this link, just replace the managed identity of the VM with the managed identity of ADF.