web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Licensing report from ...
Power Automate
Unanswered

Licensing report from Office 365 users

(0) ShareShare
ReportReport
Posted on by

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: 

replace(item()['skuId'],'6fd2c87f-b296-42f0-b197-1e91e994b900','Office 365 E3')
I have tried adding multiple expressions for the different license skuIDs we have but the ouput from the select-function is still weird, only generating one renaming. 
 
power automate.PNG
Any help appreciated! 
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard