Skip to content

Commit

Permalink
Merge pull request #199 from kaanekici/fix-dfe-username-missing-bug
Browse files Browse the repository at this point in the history
Fix missing username for defender for endpoint query
  • Loading branch information
TreWilkinsRC authored Feb 13, 2025
2 parents 993a146 + 95e24d2 commit 11a17cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions products/microsoft_defender_for_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,10 @@ def _post_advanced_query(self, data: dict, headers: dict) -> list[Result]:
raw_results.append(res)
'''
hostname = res['DeviceName'] if 'DeviceName' in res else 'Unknown'

if 'AccountName' in res or 'InitiatingProcessAccountName' in res:
username = res['AccountName'] if 'AccountName' in res else res['InitiatingProcessAccountName']
else:
username = 'Unknown'

if 'ProcessCommandLine' in res or 'InitiatingProcessCommandLine' in res:
Expand Down

0 comments on commit 11a17cd

Please sign in to comment.