Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

azure cost management gateway data source error: The service returned an invalid token

Trying to create a new Gateway data source for the 'Azure Cost Management' source.

I use all the same criteria as is successful from my Power BI Desktop connection.

 

Choose Scope: Enrollment Number

Scope Identifier: 999999999 (as per Desktop connection)

Number of Months: 6

Authentication method: OAuth2 (no other option available)

Privacy Level: Organizational

 

Error:

Unable to create data source. OAuth login through the data gateway was unsuccessful. Specific error details available below and in the gateway logs.
Details: UW Test PowerBI Gateway: The service returned an invalid token. Please contact your IT administrator if this issue persists. Please have this information handy if you choose to create a support ticket. ActivityId: 7856a8c8-957f-4954-bd84-bc786efabecb RequestId: dabdbf31-561a-4db6-aaad-a0324c051039 Cluster URI: https://api.powerbi.com Status code: 400 Time: Fri Dec 30 2022 14:38:49 GMT+1000 (Australian Eastern Standard Time)

 

I tested the connection works without using the Gateway, and that was successful.

I need to use the Gateway to define a re-usable Data Source with a Service Account for credentials.

2 REPLIES 2
lbendlin
Super User
Super User

can you confirm that Azure Cost Management actually accepts service principal logins?

Anonymous
Not applicable

Hi Ibendlin - I know the Azure Portal accepts Service Principals, but not sure how the connection from the Enterprise Gateway would differ from just connecting from the Cloud Service?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors