Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Dynamic Access Token From Power BI - multi-factor authentication MFA

Dear All,   Please give me how to get access token from Power BI Desktop. I have a code for get accesstoken     let body = "grant_type=password&resource=https://analysis.windows.net/powerbi/api...
  • v-yingjl's avatar
    v-yingjl
    5 years ago

    Hi Anonymous ,

    It is related to your Azure AD settings, not power bi.

     

    The request requires the user to do multi-factor authentication and then send this new token back to Web API 1 and complete the on-behalf-of flow. MFA was enabled by triggering a rule if some action (e.g. sudden location change) was treated as "risky activity". For an account there is a "moved to a new location" flag that can get set, automatically triggering the need for MFA, even if it was initially off.

     

    Please check the conditional access locations in Azure AD and check if your AAD admin can clear the flag. Disable MFA for the account or configure conditional access to give access to "Global Admin" role.

     

    Here are the suggestions in Azure portal:

    1.Login as a tenant admin to https://portal.azure.com
    2.Open the registration for your app in the
    3.Go to Settings then Required Permissions
    4.Press the Grant Permissions button

     

    Note: If you are not a tenant admin, you cannot give admin consent

     

    Please refer:

    1. Error 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 
    2. Multi-factor Authentication for Power BI – O365 

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.