Please read this article on how to do it using managed identity.
Active Directory authenitcation the user not registered app
Agnieszka Bemka
1
Reputation point
I build REST API that send a request to SQL database using Function App, register it in Azure Portal.
I have a problem with authentication. From my local machine I'm able to send a request to the database from the app with Active Directory Interactive authentication, but when I deploy it into portal then I will get an error:
HttpListenerException occurred while listening on http://localhost:51155/ for the system browser to complete the login