Forum Discussion

marcio_fornari's avatar
marcio_fornari
Resolver I
6 years ago
Solved

Power BI API return 401 Unauthorized` response

Hello Everybody,  I have a problem with a Power BI API   First i get the Token:     $url = 'https://login.windows.net/' . $directoryIdAzure . '/oauth2/token' /** @var GuzzleHttp\Cl...
  • marcio_fornari's avatar
    6 years ago

    I Solved my problem.

     

    I change 

    'grant_type'    => 'client_credentials',

     

    to 

     

    'grant_type'    => 'password',

     

    and I had to disable Security Defaults in the Azure 

    Azure Portal > Azure AD > Properties > Click on Manage Security Defaults link > Toggle Enable Security Defaults button to NO.

     

    I hope thats help anyone.