MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/WRITE operation performed by service principal. Received an alert in Microsoft Sentinel however, we are unable to trace the details of the service principal.

Harshita Mittakori 0 Reputation points
2025-07-16T06:15:28.7466667+00:00

MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/WRITE operation performed by service principal. Received an alert for the same in Microsoft Sentinel however, we are unable to trace the details of the service principal. As I understand it could be performed by automated scripts, I would want to understand why this could happen.

Microsoft Security | Microsoft Sentinel
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Suchitra Gannavarapu 0 Reputation points
    2025-07-17T23:13:30.1833333+00:00

    To trace, investigate, and find the Service Principal ID, go to Azure Monitor -> Activity Logs and check for operation Create or Update Network Security Group 

    To find the App ID that triggered this, go to Azure Active Directory -> Enterprise Applications (Yes, you pointed it right, automation scripts could cause this)

    Check if the IAM role is properly assigned (Role misconfiguration could cause this)

    Once UEBA is enabled in Microsoft Sentinel, examine the entity mapping and investigation graph to identify any anomalous behavior. (Compromised credentials could cause this).

    0 comments No comments

  2. EduardsGrebezs 941 Reputation points
    2025-08-11T18:56:02.8233333+00:00

    Hi, sometimes it could be related to that what is included in your entities in analytic rule which detected such behaviour.

    Easiest way is to copy analytic rule and go to hunting, by findings that in Azure Activity table:

    AzureActivity

    | where OperationNameValue == "Microsoft.Network/networkSecurityGroups/write"
    | where ActivityStatusValue == "Success"

    Also, do you collect logs from Service principals in Entra ID connector?

    0 comments No comments

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.