Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Generating an access token

I am generating an access token to use with the Power BI REST API but for users with MFA enabled that doesn't work.


client_id: ...
grant_type: password
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! 

Frequent Visitor

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. 

Frequent Visitor

If someone has come across this and the solution for this, I highly appreciated. Thanks for contributing ideas.

Super User III
Super User III

Helpful resources



We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!


The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors