Microsoft Graph API pagination #488
-
I am using Microsoft Graph API with your plugin and wants to thank you also to giving us this beautiful plugin I want to ask I am fetching direct routing calls with https://graph.microsoft.com/v1.0/communications/callRecords/getDirectRoutingCalls(fromDateTime=2019-11-01,toDateTime=2019-12-01) api when the record is above 1000 it is give an |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Nope.. pagination is not supported by the plugin yet. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@Usama420-git, I am currently configuring Grafana with this plugin to use with the Microsoft Graph. I followed this https://sriramajeyam.com/grafana-infinity-datasource/wiki/azure-authentication/ documentation and got it to work with Azure Resources. However, can you help me out what settings are required to get it to work with Microsoft Graph? CC: @yesoreyeram |
Beta Was this translation helpful? Give feedback.
While pagination isn't necessarily supported by the plugin, you can manually deal with it if you roughly know how many results you're going to produce. You can create several identical queries calling out different pages, then use a 'Merge' Transformation, which will essentially union it all together.
i.e.
In your case, you're going to need to know roughly how many users you're trying to query, if 2,000 - 3,000, then do 3 queries (1,000 max results each)
Because you are manually defining pages, this method will not scale with your data, which is the biggest downfall.