How can I fix Azure Bastion sessions?

3.5k Views Asked by At

When I connect to a Windows VM using Bastion, I get the error: “A Bastion session should be initiated only from Azure Portal. Please login to Azure Portal and start your session again.” Of course, I am logged into Azure Portal, and I did start it from there. Then I can see the server desktop, but it is dimmed and not responsive due to the modal dialog with the error and a close button.

Bastion error

More details: On the Connect screen there is an “Open in new browser tab” option. If I clear that, then I don’t get the above error, but then screen is just blank. After I click connect, in the lower right corner it shows for a second, "The network connection to the Bastion Host appears unstable." It acts the same if I am on a VM or not. I am using an AD account; it acts the same if I include just the username or name@domain.

How can I get Bastion to work?

3

There are 3 best solutions below

0
On

I disabled or deleted all my browser extensions, and that fixed it. The problem extension was Wappalyzer.

0
On

In my case, the extension causing the issue was "React Developer Tools", after disableing it, the error message did not appear again.

0
On

The smartest solution is to set React Developer Tools (or your other conflicting extension) Site Access Property to On Click: React Developer Tools Site Access

Alternatively for a pure JavaScript solution document.querySelector('.status-outer.shown').remove() will remove the container that's blocking your access. You can drop that in a snippet or a tampermonkey script for *.bastion.azure.com/#/client.