Hi Peter Koller,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
As we understand that, you are encountering challenges with token-based authentication using Microsoft Entra ID.
We would like to inform you that, the access token's validity is 5 minutes to 60 minutes. You should get the access token before initiating the sign-in to Azure Database for PostgreSQL. Existing token's lifetime will not be changed. After they expire, a new token will be issued based on the default value.
If you need to continue to define the time period before initiating the sign in again, configure sign-in frequency in Conditional Access. To learn more about Conditional Access, please refer this link Configure authentication session management with Conditional Access.
Please refer to the below mentioned link for more information.
I hope, This response will address your query and helped you to overcome on your challenges.
If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.