Response status code doesn't indicate success: 401 (unauthorized)

Amol Tidke 1 Reputation point
2021-02-04T13:29:29.893+00:00

Hi All,

I am getting above error "Response status code doesn't indicate success: 401 (unauthorized)"
in response when I make an http call to my azure function from console app.

I have checked all the app service settings parameters, get function URL, CORS setting and everything is fine but still I am getting above error.

My function works fine on local but when I try to run as remote it fails. Its making call to Azure function but getting unauthorized in response.

Please find below screen shots:

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,977 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pramod Valavala 20,626 Reputation points Microsoft Employee
    2021-02-05T05:13:25.17+00:00

    The default authorization scope for generated functions is Function which requires a key to trigger when running on Azure. Locally, this is bypassed.

    You can obtain the keys from the portal or via API as mentioned in the docs.


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.