Connect a Web app (Wordpress) to SQL Database via Azure Entra Authentication

ARFAOUI Kawther Ext OBS/FZ 0 Reputation points
2023-11-20T13:57:32.81+00:00

Hello support team,

I want to change the authentication method for my Azure Database for MySQL flexible server to Microsoft Entra authentication only , knowing that it's connected to an Azure web app (wordpress) that uses sql username and password to connect to the DB.

I have followed this tutorial: https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-azure-ad but the token expires in 60mins maximum.

Also , I tried this tutorial: https://learn.microsoft.com/en-us/azure/app-service/tutorial-connect-app-access-sql-database-as-user-dotnet?tabs=ef%2Cdotnet#what-happens-when-access-tokens-expire but I didn't know how to retrieve the token in the end: the example was for ASP.Net, so I'm not sure if it works for my case where I need to define the token as DB_PASSWORD.

I hope you have help me out with this issue.

Regards,

Kawther

Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.