I put on a Sharepoint site an ajax request to my azure function.
This azure function requires authentication because its logic depends on which user is using my sharepoint site. All users who test my sharepoint site have authenticated this azure function by calling it in a separated browser tab.
The problem is that when this azure function is called inside the Sharepoint site - a request to login.windows.net appears. I can see this in my browser network tools.
Why this is happening? A user who was logged into the Sharepoint had already authenticated this azure function. Moreover, he could call this azure function in a separated browser tab.
Does it mean that Sharepoint calls azure functions not on behalf of the currently logged user but as a some kind of special user?
If yes - how can I authenticate this special user to my azure function?
Thank you, Mike