Forum Discussion
Running Graph API queries
- 7 years ago
I would also prefer that this would be easier.
Currently you have to:
1) use a custom connector and
2) create an app in the azure portal that handles the authentication for the connector
With my connector, I'm able to see the license details. Unfortunately I cannot add the permissions for the subcriptions to the app, as that's a preview feature currently.
Please let me know if you want to proceed just for the license details and I can provide further help on how to implement the connector. Am I getting it right that you have registered you app successfully already?
- 7 years ago
Hi alietzau ,
great - thanks for the tip - that worked for me as well! Actually, didn't have to clear my other permissions fortunately.
You can try my connector. The enclosed zip includes all files necessary. You have to perform the following steps:
1) Unzip it
2) edit client_id: replace content by the client id of your app
3) edit client_secret: replace content by the client secret of you app
4) zip all files back and rename the zip to "MyGraphB.mez"
5) Copy that file into your Power BI Desktop-folder: C:\Users\<YourUserName>\Documents\Power BI Desktop\Custom Connectors
Now, when you type in "mygr" for example, these 2 items should show up:
Choose the latter ("MyGraphB2.WebContents") and paste the URL of your choice.
If interested, I've described the Web.Contents-addition here: https://www.thebiccountant.com/2019/04/17/graph-api-custom-connector-power-bi/
Hi alietzau ,
It seems that you want to use the Graph API as the data source in power bi desktop.
If that is the case, please refer to this similar thread which has been solved firstly.
If you need other help, please feel free to ask.
Best Regards,
Cherry
v-piga-msft The post that you linked is the same as the one that I refer to in my original post. The guide that they link to is not a step by step guide and it is hard to follow what they are trying to do and where the powerquery goes. Many of the links for supporting material in that same guide are broken, it's hard to investigate this issue. There are also users at the end of that post that mention that they are still having issues after looking into this for months.
I think that Graph API is a powerful resource to have and it's a shame that the PowerBI community doesn't have a clear way to pull in the information from it. I think if we resolve this, we can help the community by creating powerful dashboards without the need for third party tools.
- ImkeF7 years agoCommunity Champion
I would also prefer that this would be easier.
Currently you have to:
1) use a custom connector and
2) create an app in the azure portal that handles the authentication for the connector
With my connector, I'm able to see the license details. Unfortunately I cannot add the permissions for the subcriptions to the app, as that's a preview feature currently.
Please let me know if you want to proceed just for the license details and I can provide further help on how to implement the connector. Am I getting it right that you have registered you app successfully already?
- alietzau7 years agoFrequent Visitor
ImkeF I was just able to get the queries that I listed to work, using the permission of "Directory.Read.All" and making sure that no other permissions were added to my App. I'm listing the results of the queries below for reference.
- https://graph.microsoft.com/v1.0/subscribedSkus
- Retreieves the license count, usage, and open license count for our tenant.
- https://graph.microsoft.com/v1.0/users/<UPN>/licenseDetails
- Retrieves the licenses that a user has. (like their E3 or PowerBI Pro)
Now all I need to do is build the powerquery to run the Graph API query. I took another look at the guide that mention in my original post and it's still hard to follow. Do you have a good guide to building this custom connector? I think this is the final road block stoping me from using the data.
- ImkeF7 years agoCommunity Champion
Hi alietzau ,
great - thanks for the tip - that worked for me as well! Actually, didn't have to clear my other permissions fortunately.
You can try my connector. The enclosed zip includes all files necessary. You have to perform the following steps:
1) Unzip it
2) edit client_id: replace content by the client id of your app
3) edit client_secret: replace content by the client secret of you app
4) zip all files back and rename the zip to "MyGraphB.mez"
5) Copy that file into your Power BI Desktop-folder: C:\Users\<YourUserName>\Documents\Power BI Desktop\Custom Connectors
Now, when you type in "mygr" for example, these 2 items should show up:
Choose the latter ("MyGraphB2.WebContents") and paste the URL of your choice.
If interested, I've described the Web.Contents-addition here: https://www.thebiccountant.com/2019/04/17/graph-api-custom-connector-power-bi/
- https://graph.microsoft.com/v1.0/subscribedSkus