Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am generating an access token to use with the Power BI REST API but for users with MFA enabled that doesn't work.
Request: https://login.microsoftonline.com/common/oauth2/token
client_id: ...
grant_type: password
resource: https://analysis.windows.net/powerbi/api
username: ...
password: ...
client_secret: ...
Error message:
AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access
Is there any way to obtain the access token without disabling MFA?
Thank you in advance!
through Powershell it can be done, have a look at module MicrosoftPowerBIMgmt
Thank you Ilbendlin,
Disabling MFA is not an option unfortunately. I read answers from the second post but from what I can see SPN can't be used to obtain the access token needed. I've seen other applications offering the same functionality using the API and it was compatible for users with MFA enabled. Is it maybe possible to use the 'client_credentials' grant type for obtaining the access token somehow?
Thank you in advance.
If someone has come across this and the solution for this, I highly appreciated. Thanks for contributing ideas.
There are a couple of posts in this forum on that topic.
https://community.powerbi.com/t5/Developer/Power-BI-Admin-API-with-MFA/td-p/1117389
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 |