Azure Entra ID Authentication fails on Azure APP Services

21887231 0 Reputation points Microsoft Vendor
2024-07-10T18:52:40.6633333+00:00

On Local applicaitons we are able to validate connection Server=tcp:XXXXX.database.windows.net,1433;Initial Catalog=demo;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;Authentication=Active Directory Default;

Once deployed in azure same application its throwing 500 error. Can you help me here please

Azure SQL Database
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,617 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sai Raghunadh M 75 Reputation points Microsoft Vendor
    2024-08-23T05:22:49.4533333+00:00

    Hi @21887231,

    Thanks for the question and using MS Q&A platform

    If you're having trouble with Azure Entra ID authentication on Azure App Services, there are a few things you can check to troubleshoot the issue:

    • Check that the settings you're using for Entra ID authentication in your application match the settings you used when testing the application locally. This includes the tenant ID, client ID, and client secret.
    • Check that your database firewall settings allow your application to connect to it. You can do this by going to your database in the Azure portal and clicking on "Firewalls and virtual networks" under the "Security" section.
    • Check the logs for your application to see if there are any error messages or other information that can help you identify the issue. You can access the logs for your application in the Azure portal by going to your App Service and clicking on "Log stream" under the "Monitoring" section.
    • Make sure that your App Service is running on a plan that supports Entra ID authentication. Not all App Service plans support this feature, so you may need to upgrade your plan if you're experiencing issues.

    Hope this helps. Do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful.


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.