Modification calls with Azure AI Agent Function is causing Security Alerts

Deepankar 120 Reputation points
2025-05-04T11:22:35.1366667+00:00

Trying this below POC with a function which can extract temperature data and print in Console: https://learn.microsoft.com/en-us/azure/ai-services/agents/how-to/tools/function-calling?tabs=csharp&pivots=code-example

This is very strange. I created multiple AI agent functions to retrieve data, and my code was working smoothly. However, when I created a function to submit data, I started receiving security alerts and malware protection warnings indicating that it was trying to access my project DLL. Can someone check and confirm the issue? I understand that running Visual Studio in admin mode might resolve this, but it shouldn't be necessary. Since I can run the function in normal mode, the function related to modification (which isn't actually modifying anything, as I've hardcoded all the values) should also be able to run.

Below is the screenshot regarding which no security alert occurred.

User's image

Below is the code which is throwing security alert. And yes if I keep the property Location, the alert is not coming. Apart from Location, it is throwing Malware alert.
Screenshot 2025-05-04 164758

Below is the security threat error message and build error.
User's image

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,396 questions
0 comments No comments
{count} votes

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.