question

MokarizadehShahabSEBT-3322 avatar image
0 Votes"
MokarizadehShahabSEBT-3322 asked MayankBargali-MSFT edited

Getting 500 from Azure Function when authLevel=function

Hi

I have simple HTTP triggered Azure function. When authLevel=anonymous I can reach the function and it works
But when I set the authLevel=function , and I invoke same url (lets say POST with respective function key) I get 500 error .
It doesn't seem to be related to Function Key as otherwise I get 401 (unauthorized error).

There should be something else, but what?

azure-functions
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MokarizadehShahabSEBT-3322 Have you reviewed the application insights logs for your function app to know what is causing the 500 error? 500 error could observe due to multiple reasons and when you mentioned that when you set authLevel=function whether the POST request body is same in working/non working scenario except the query string having clientid parameter or the request header 'x-functions-clientid' that you are sending in your request. Please share more details in my private comment so I can assist you further.

0 Votes 0 ·

1 Answer

MokarizadehShahabSEBT-3322 avatar image
0 Votes"
MokarizadehShahabSEBT-3322 answered MayankBargali-MSFT edited

Hello,
I solved the problem by removing the folder which keeps the secrets in the Azure function storage, it seemed that settings are not updated after I changed function from anonymous to function "authLevel".

best
Shahab

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MokarizadehShahabSEBT-3322 Thanks for the update. Glad to know that you were able to find the root cause. Please feel free to 'Accept as answer' so that it can help others in the community looking for help on similar topics.

0 Votes 0 ·