Forum Discussion

h4tt3n's avatar
h4tt3n
Helper V
5 years ago
Solved

(PowerShell) Connect-PowerBIServiceAccount not working

Hello folks,

 

Since yesterday I have been unable to log on to PBI service through PowerShell with the 

Connect-PowerBIServiceAccount command. I have been working with PBI service management via PS scripts for some time, adding/deleting reports, refreshing datasets, managing refresh schedules an so on, and it has worked really well until now.
 
It is critical that the error is found quickly, since it is preventing me from doing my job and keeps the many PBI reports of our company hanging in an unmanaged state.
 
What could be the cause of this error? It turned up overnight and is not caused by any change in the scripts or developer environment (VS Code).
 
Here is the error mesage:
 

Sorry, but we’re having trouble signing you in.

 
AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: 'ea0616ba-638b-4df5-95b9-636659ae5121'.

Request Id: 18389c28-151c-4286-aaf4-67606d172e00

Correlation Id: f79280b7-ad4f-4119-a7ad-5e6ef4b33032

Timestamp: 2021-02-19T11:53:23Z

Message: AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: 'ea0616ba-638b-4df5-95b9-636659ae5121'.

  • Problem found and solved!

    It turned out that an update to the PowerShell extension for VS Code set this value "powershell.useX86Host": true. In other words, it started running 32 bit as default. Manually changing it back to x64 like shown in the screenshots belov solved the problem:

     


    Cheers, Mike

19 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    I am experiencing the same exact problem today. 

  • Hi @v-shex-msft, I have this problem for a week already and it doesn't go away.
    I've also checked App Registrations and there is no such app with the ID 'ea0616ba-638b-4df5-95b9-636659ae5121'. Any thoughts? Thanks

    • h4tt3n's avatar
      h4tt3n
      Helper V

      OP here, now we are experiencing the same problem again, and is has persisted for several days. 

  • OP here, problem is partially solved. The script runs fine in the PowerShell ISE editor, but it won't run in VS code. If you are having problems, try updating the MicrosoftPowerBIMgmt module with the command: 

     

    Install-Module MicrosoftPowerBIMgmt -force -AllowClobber

    and then run the script in either PS command line tool or ISE. This has worked for me. 

    However, since VS code is a superior toll over cmd or ISE, and sinc it is a Microsoft product, I am holding my support ticket open.
  • Problem found and solved!

    It turned out that an update to the PowerShell extension for VS Code set this value "powershell.useX86Host": true. In other words, it started running 32 bit as default. Manually changing it back to x64 like shown in the screenshots belov solved the problem:

     


    Cheers, Mike

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi h4tt3n,

    I test the Connect-PowerBIServiceAccount with OAuth mode and it works well.

    What authorization mode you work on? Did this issue still appear on your side? Any policy or rule change that applies to your device/environment? (they may block power bi requests) Please share more detailed information to help us clarify these.
    How to Get Your Question Answered Quickly 
    Regards,

    Xiaoxin Sheng

    • h4tt3n's avatar
      h4tt3n
      Helper V

      Hi Anonymous 

       

      The problem has disappeared again over the weekend. I assume it was due to overload on parts of the Microsoft servers or a small bug that was caught and fixed quickly.

      Cheers, Mike

  • OP here. The problem has returned again, and has persisted for about a week. No changes has been made on our side to any PS scripts. We get the exact same error message. What is the issue, and can we do anything about it?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi alexgor87,

      If you do not change the setting on these function usage but this issue appears frequently. It means the issues may be related to some backend/remote processing of these function usages.
      In my opinion, I'd like to suggest contact to the author of the packages to report this.

      Regards,

      Xiaoxin Sheng

      • h4tt3n's avatar
        h4tt3n
        Helper V

        Exactly my thought. We use Microsofts official PowerBi management package, so I think the best thing to do is open a ticket with their support.

  • Maybe helpfull to note that recently I noticed that MSAL throws errors when trying to log on using interactive logon like explained on the site of Reza Rad https://radacad.com/powershell-cmdlets-for-power-bi-what-is-it-and-why-should-you-care/ . Like pasted below.
    Now Powershell-ISE blocks on that, the popup does not come up. But the normal Powershell client continues after the warning. And still gives the opertunity to aquire a bearer token. 

    WARNING: False MSAL 4.64.0.0 MSAL.CoreCLR .NET Framework 4.8.9325.0 Microsoft Windows 10.0.26200 [2026-06-16
    12:57:14Z] [MSAL:0001] WARNING SetAuthorityUri:78 Initializing authority from URI
    'https://login.microsoftonline.com/organizations/' without authority type, defaulting to MsSts