Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

MicrosoftGraph error

I am using PowerBi Desktop to access the Microsoft Security Graphs, when I try and get any data this is the error that I recieve. I have done my research and cannot find out how to fix this, any advise would be appreciated !!

 

Error:

 

ole db or ODBC error: [Datasource.error] MicrosoftGraphSecurity
Request failed: The remote server returned an error: (400)Bad Request (max result set size 6200 cannot
exceed 6000)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Was told to address my issue i have to do the following

include only $top and not $skip in your first GET query. You can use @odata.nextLink for pagination. If you need to use $skip, it has a limit of 500 alerts. For example, /security/alerts?$top=10&$skip=500 will return a 200 OK response code, but /security/alerts?$top=10&$skip=501 will return a 400 Bad Request response code. For more information, see Microsoft Graph Security API error responses.

 

A work around for this limit is to use the $filter OData query parameter with the eventDateTime of the alert entity from the Microsoft Graph Security API, using ?$filter=eventDateTime gt {YYYY-MM-DDT00:00:00.000Z} and replacing the dateTime value with the last (1500th) alert. You can also set a range for the eventDateTime; for example, alerts?$filter=eventDateTime gt 2018-11-11T00:00:00.000Z&eventDateTime lt 2018-11-12T00:00:00.000Z

Utilize the "$filter" parameter to control the results returned to function below the 6000 limitation. 

 

However I do not have enough experience on how to perform this but wanted top post what was recommended by Microsoft.

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

From this error message, it seems there are too many your queries to exceed the limiations of the API.

If so, please limit the results.

https://docs.microsoft.com/en-us/graph/known-issues#query-parameter-limitations

 

this error status code also indicates if the query is correct. please check if you do the right steps.

https://docs.microsoft.com/en-us/power-bi/desktop-connect-graph-security

You can connect to it via Odata connector or write queries in Advanced editor.

 

Best Regards

Maggie

 

Anonymous
Not applicable

Was told to address my issue i have to do the following

include only $top and not $skip in your first GET query. You can use @odata.nextLink for pagination. If you need to use $skip, it has a limit of 500 alerts. For example, /security/alerts?$top=10&$skip=500 will return a 200 OK response code, but /security/alerts?$top=10&$skip=501 will return a 400 Bad Request response code. For more information, see Microsoft Graph Security API error responses.

 

A work around for this limit is to use the $filter OData query parameter with the eventDateTime of the alert entity from the Microsoft Graph Security API, using ?$filter=eventDateTime gt {YYYY-MM-DDT00:00:00.000Z} and replacing the dateTime value with the last (1500th) alert. You can also set a range for the eventDateTime; for example, alerts?$filter=eventDateTime gt 2018-11-11T00:00:00.000Z&eventDateTime lt 2018-11-12T00:00:00.000Z

Utilize the "$filter" parameter to control the results returned to function below the 6000 limitation. 

 

However I do not have enough experience on how to perform this but wanted top post what was recommended by Microsoft.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.