Deployed function, runs fine locally, but on azure, need to have code= parameter to run?

kn 236 Reputation points
2021-06-17T06:42:12.9+00:00

I'm following this tutorial:
https://learn.microsoft.com/en-us/learn/modules/develop-test-deploy-azure-functions-with-visual-studio/5-exercise-publish-azure-functions

I can run the function fine on my local: http://localhost:7071/api/WatchInfo?model=abc

However, when publishing this to Azure, I need to have code parameter for it to work: https://grabdataiii2xxxxxxx2244.azurewebsites.net/api/WatchInfo?code=0L33RR94lOgE8O7ZLMeHCgA8oYxxxxxKbeu918GOuKAw2YU1v4Q==&model=abc

According to the tutorial, this was supposed to work: https://grabdataxxxxxx232244.azurewebsites.net/api/WatchInfo?model=abc

Otherwise, it would not run? Any ideas why?

Here's the code:
106419-image.png

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

Accepted answer
  1. kn 236 Reputation points
    2021-06-17T07:05:26.417+00:00

    AuthorizationLevel needed to be: AuthorizationLevel.Anonymous

    1 person found this answer helpful.

0 additional answers

Sort by: Most 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.