O-365 Integration Error for Testing GET PowerBI Usage API

Asmita7
Tera Expert

Hello friends,

 

I am working on O-365 Integration to get software usage details automatically. I have created account on Microsoft Azure Portal as per the steps given in article :

https://docs.servicenow.com/bundle/vancouver-it-asset-management/page/product/software-asset-managem...

 

Direct integration profile created in ServiceNow with parameters like tenand ID, client secret etc.

OAuth token is successfully created. Then it has created 5 API/http methods :

1. GET PowerBI Usage

2. POST Users By Batch

3. GET users

4. Default GET

5. GET Reports

Out of these 5 API's, when tested using the related link "TEST", first 2 API tested failed:

1. GET PowerBI Usage : Error screenshot --

Asmita7_0-1693228688396.png

2. POST Users By Batch

Asmita7_1-1693228771620.png

The PowerBI error might be due to firewall but not sure.

 

Anyone please help on this.  How to resolve these errors.

 

Your support is valuable and will be appreciated.

 

Thank you

 

 

 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Sure. Will update accordingly. 

By the time, please check the Power Bi set up steps and admin center steps as per Docs.

View solution in original post

5 REPLIES 5

aschwarz1
Tera Contributor

Hello, I was able to solve the issue for my client. My client is on a GCC instance of Power BI. This requires updating two things.
1. REST Endpoint

2. OAuth Scope

 

By default, ServiceNow uses the worldwide versions of these. Currently, their installation documentation only mentions endpoints, not OAuth scope. I have an open HI Case informing them of this omission. 

 

GCC Scope: https://analysis.usgovcloudapi.net/powerbi/api/.default

GCC GET PowerBI Usage endpoint: https://api.powerbigov.us/v1.0/myorg/admin/activityevents

Keep in mind, the endpoints vary and you can figure out which one you need to use using this Microsoft article:

https://learn.microsoft.com/en-us/power-bi/enterprise/service-govus-overview

 

Once I updated both of these and re-ran the SAM - Collect Microsoft 365 Usage scheduled job, I got the Power BI success indicator.