Hi Agentum kontakt,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
As we understand that, you are facing a significant issue with your API following the migration of your database from Azure Database for PostgreSQL Single Server to Azure Database for PostgreSQL Flexible Server.
Based on the information provided, the following preliminary observations and potential solutions could be considered:
- Database Connectivity: It is possible that credentials or authentication methods need adjustments for the new flexible server. Ensure that the API is using the correct credentials and authentication mechanisms to connect to the database on the new server.
- Firewall Rules: Verify that the API server's IP address is allowed in the firewall configuration of the new database server. Adjust the firewall rules to permit the API server's IP address for database connectivity.
By addressing these potential issues related to database connectivity and firewall rules, you may be able to resolve the HTTP 401 Unauthorized error and restore connectivity between the API and the database on the Azure Database for PostgreSQL Flexible Server.
Please refer to the below mentioned links for more information.
https://learn.microsoft.com/en-us/azure/dms/known-issues-troubleshooting-dms
I hope this information helps. If the issue still persists, please let us know here. We will respond with more details and try to help you.
If this answers your query, do click Accept Answer and Yes for was this answer helpful.