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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Kassii
Frequent Visitor

Getting around Oauth2

Hi guys.

Just wondering if anyone can give me a hand and answer this query

Is it possible to have the credentials for Oauth2 hard coded in as opposed to when I request the access token and have to enter them?

Or is there a way to make dashboards and reports 100% public so that all that is required is to just load the webpage (so to speak) and the iFrames will be present with data

 

Any help would be great guys 🙂

1 REPLY 1
Eric_Zhang
Microsoft Employee
Microsoft Employee

@Kassii

Technically it is possible. You can get a token from the API POST https://login.windows.net/common/oauth2/token with GRANT_TYPE=password

 

 

POST /common/oauth2/token HTTP/1.1
Host: login.windows.net
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Postman-Token: 14968174-d130-31dd-7dac-f78c06844286

client_secret=zmZ%2BC1nx3SXgrBzVOce%2BPb4T6uxrpnmmDPHahzPUhE4%3D&client_id=30d8120d-52c9-40f1-ac3b-d0c6720f0f20&grant_type=password&resource=https%3A%2F%2Fanalysis.windows.net%2Fpowerbi%2Fapi&username=YOURUSERNAME%40microsoft.com&password=YOURPASSWORD

 

Then keep getting access token via the refresh_token in above response. 

 

However I doubt this would violate the license compliance as all people would aceess the restricted reports/dashoboard  with the same credential.

 

For public sharing, you can consider "Publish to web" or Power BI Embedded which have no user licenses at all.

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors