Unable to receive incidents with status `redirected` using Outh2.0
I am using [https://graph.microsoft.com/v1.0/security/incidents
](https://graph.microsoft.com/v1.0/security/incidents%60) API to fetch all the incidents. To access this API, I am using two types of tokens.
- Basic Auth: By providing client_id and client_secret
- OAuth2.0: Authorize the user using the OAuth flow.
Here, when I tried with a Basic auth-generated token, I could fetch 152 incidents in total. But with OAuth, I will only be able to fetch 131 incidents.
I have observed that records with a status set as redirected
are not present in the OAuth access token. Both the tokens have the same permissions.
I am unable to find any details in the API doc as well https://learn.microsoft.com/en-us/graph/api/security-list-incidents?view=graph-rest-beta&tabs=http.
why does it return a different response? Also, the User is a global admin so it has all the permissions.
Sample response which is not present with OAuth2.0 generated access token
{
"id": "344",
"status": "redirected",
"comments": [],
"severity": "low",
"tenantId": "a417c578-xxxx-xxxx-xxxx-xxxxxxxx",
"assignedTo": null,
"customTags": [],
"systemTags": [],
"description": null,
"displayName": "Antimalware Action Taken on one endpoint",
"determination": "unknown",
"classification": "unknown",
"incidentWebUrl": "
"lastModifiedBy": "Microsoft 365 Defender-AlertCorrelation",
"createdDateTime": "2024-01-15T09:34:01Z",
"lastUpdateDateTime": "2024-01-15T09:39:58.5866667Z",
"redirectIncidentId": "342"
}