Hello,
I am trying to delete all my stale devices in Entra with a logic App, which should run weekly. Unfortunately, I am running into problems.
With Graph GET request, I can only receive 100 entries if I did my research correctly. So What I am trying to do with the Do → Until loop is to paginate through all the devices (~2000), filter all out which are stale (not signed in since >=180 days) and append these to the Array AllDevices. Then with the odata.nextLink property, I want to do the loop until it is Null. However, this does not work as intended, it seems like it still only gets 100 devices and/or does not append to the array.
The parse logic looks like this:
{
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"approximateLastSignInDateTime": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"displayName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"approximateLastSignInDateTime",
"displayName"
]
}
},
"@@odata.nextLink": {
"type": [
"string",
"null"
]
}
},
"required": [
"value"
]
}
The delete logic already works out fine, by the way.
Below I append the flow logic, if you need further details to help me troubleshoot, let me know!



Thanks!
PS: this is built via a logic app in Azure not PowerAutomate, but logic wise it should not make any difference afaik.