Hi,
I aim to build a licensing report flow that invokes an HTTP request to Office 365, with some filters, and returns useful info like username, title, phone number and assigned licenses. The goal is to get this data into a sharepoint list for name, e-mailaddress, phone number and licenses.
The output is json parsed to get dynamic content. Since the JSON produces nested arrays I am having issues knowing how to handle the output. This is the JSON putput:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(id,displayName,mobilePhone,mail,jobTitle,assignedLicenses)",
"@odata.count": 9,
"value":
{
"id": "86a7efac-f250-42db-8bdc-xxxxxxxxxx",
"displayName": "Elisabet XXXXXXXX",
"mobilePhone": "+XX XX XX XX XX",
"mail": "elisabet@XXXXXXXX.example",
"jobTitle": "Administration / Ekonomi",
"assignedLicenses": [
{
"disabledPlans": [
"bea4c11e-220a-4e6d-8eb8-8ea15d019f90"
],
"skuId": "6fd2c87f-b296-42f0-b197-1e91e994b900"
},
{
"disabledPlans": [],
"skuId": "b05e124f-c7cc-45a0-a6aa-8cf78c946968"
}
]
}
The issues I'm having are mostly centered around "assignedlicenses":
1. I need to rename the skuID-values to readable text to their corresponding correct name and since different licenses are in different arrays the renaming needs to be done for all instances of every skuID.
2. Each user can have several licenses and each license is in a different array. I would ideally want to join all license arrays into one, and in that process filter away the "disabled" plans which is unuseful anyway. This would make the extraction of the data easier.
Adding an image of the flow, please get back with any questions for clarification.
In the last loop I am testing a select function where I replace the value of "skuid" to the corresponding name of the license:
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2