@Mittapelli, S (Sathishkumar) I haven't heard back from you since my last comment.
Please do also check this link https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-azure-ad#2---retrieve-microsoft-entra-access-token
I would suggest migrating to Azure PostgreSQL flexible server. Single server is in retirement phase. https://learn.microsoft.com/en-us/azure/postgresql/single-server/whats-happening-to-postgresql-single-server
Please do let me know if that works.
Regards,
Oury