© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago
malkav

✅ Trying to trigger Azure Function with OpenApi

So right, never had an issue with this but now all of a sudden... (I might have done something wrong, but can't find it...

Right.. So I created an Azure Function with OpenApi tags, so I can call the Azure function from
../api/swagger/ui
../api/swagger/ui
and test the various parameters and such.
The way I setup my OpenApi tags above the Azure Function is the way I always did things, so I can secure them later. But when using them in localhost I never had to Authorize before being able to push the blue
Execute
Execute
button. But right now I've got the blue button but it won't trigger anything, and above the function it says I need to authorize??? I don't have an ApiKey since it's currently localhost. Unless I am missing something??

Here's the OpenApi tags:
[FunctionName("Execute")]
    [OpenApiOperation("Run", tags: new[] { "Run" }, Visibility = OpenApiVisibilityType.Important)]
    [OpenApiSecurity("function", SecuritySchemeType.ApiKey, Name = "code", In = OpenApiSecurityLocationType.Query)]
    [OpenApiRequestBody(contentType: "application/json; charset=utf-8", bodyType: typeof(RequestBody),
        Description = "The example request JSON body", Example = typeof(RequestBodyExample))]
    [OpenApiResponseWithBody(contentType: "application/json", bodyType: typeof(ResponseBody),
        statusCode: HttpStatusCode.OK, Description = "The result", Example = typeof(ResponseBodyExample))]
    public static async Task<IActionResult> RunAsync(
[FunctionName("Execute")]
    [OpenApiOperation("Run", tags: new[] { "Run" }, Visibility = OpenApiVisibilityType.Important)]
    [OpenApiSecurity("function", SecuritySchemeType.ApiKey, Name = "code", In = OpenApiSecurityLocationType.Query)]
    [OpenApiRequestBody(contentType: "application/json; charset=utf-8", bodyType: typeof(RequestBody),
        Description = "The example request JSON body", Example = typeof(RequestBodyExample))]
    [OpenApiResponseWithBody(contentType: "application/json", bodyType: typeof(ResponseBody),
        statusCode: HttpStatusCode.OK, Description = "The result", Example = typeof(ResponseBodyExample))]
    public static async Task<IActionResult> RunAsync(


What am I missing?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ SignalR trigger for Azure Function (isolated) does not trigger.
C#CC# / help
12mo ago
✅ Blob Trigger Azure Function is not triggering
C#CC# / help
2y ago
trying to plan validating azure ad token and calling graph api in azure function
C#CC# / help
2y ago
Azure Function Function Attribute Dynamic Value
C#CC# / help
3y ago