...
Step 20: Add permissions to ActivityFeed.Read
...
Step 21: Add Security events permission to get the Microsoft defender logs.
Step 22: Select the Application Permission & search for SecurityEvents.Read.all.
...
Step 23: Now you need to Grant admin consent and click on Yes.
...
Step 2224: Check if all the permissions are granted or not.
...