Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
b5lurker
Advocate II
Advocate II

Unable to Delete Gateways

I have been unable to delete 2 gateways that were setup on servers that we have since been decommissioned. I have removed all of the data sources tied to these gateways, but still get an error when I try to Delete them using the elispes menu in the Gateway Admin page. Below is are the error messages displayed for each gateway (prddg3 & prddg03):

 

Something went wrong
We could not remove this gateway because it is the primary gateway within a cluster that has other gateway instances. Please remove other gateway instances from this cluster before removing the primary gateway.
Please try again later or contact support. If you contact support, please provide these details.
Activity ID: a2de8002-2fa2-45f1-bc6f-50d8403a4b9d
Request ID: 966ad5ef-84c5-3965-661b-4a88003c1fa6
Correlation ID: 416e135e-d241-9de0-2e5f-617d125c2a2f
Status code: 400
ecsCorrelationId: a2de8002-2fa2-45f1-bc6f-50d8403a4b9d
Time: Thu Jan 03 2019 10:52:14 GMT-0700 (Mountain Standard Time)
Version: 13.0.7683.237
Cluster URI: https://wabi-west-us-redirect.analysis.windows.net

 

Something went wrong
We could not remove this gateway because it is the primary gateway within a cluster that has other gateway instances. Please remove other gateway instances from this cluster before removing the primary gateway.
Please try again later or contact support. If you contact support, please provide these details.
Activity ID: a2de8002-2fa2-45f1-bc6f-50d8403a4b9d
Request ID: 5be291a8-79be-e214-8c16-0b0d5761895e
Correlation ID: 208ce98b-a68c-fec9-9796-ed956d8f2b9c
Status code: 400
ecsCorrelationId: a2de8002-2fa2-45f1-bc6f-50d8403a4b9d
Time: Thu Jan 03 2019 10:58:00 GMT-0700 (Mountain Standard Time)
Version: 13.0.7683.237
Cluster URI: https://wabi-west-us-redirect.analysis.windows.net

 

We have the correct cluster up and running in this page named prddg03west.

 

Thanks,

Steve

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @b5lurker,

 

I got the method to remove the clusters of Data Gateway from an expert. Please refer to service-gateway-high-availability-clusters#powershell-support-for-gateway-clusters.

Cannot_remove_Gateway_Cluster_in_Power_Bi_Service_when_the_gateways_are_inaccessible

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

5 REPLIES 5
mmontalvo
Regular Visitor

I actually did it very easily by going to Power Bi Service portal, Settings, Manage Connections and Gateways

mmontalvo_0-1744163496484.pngmmontalvo_1-1744163540935.png

 

There were zero errors when done from here...unlike trying the same process from makepowerapps

 

Cheers!

Anonymous
Not applicable

Thanks for this information, unfortunately I can't get it to work. When I run   Remove-OnPremisesDataGateway  I get an Unauthorized error:

Any ideas why this would occur ? I am logged in with the PowerBI account that is an administrator on the gateway.

image.png

 

Thanks

v-frfei-msft
Community Support
Community Support

Hi @b5lurker,

 

I got the method to remove the clusters of Data Gateway from an expert. Please refer to service-gateway-high-availability-clusters#powershell-support-for-gateway-clusters.

Cannot_remove_Gateway_Cluster_in_Power_Bi_Service_when_the_gateways_are_inaccessible

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

None of the above worked for me.

However, I was able to remove the Gateway Cluster by actually logging in as myself (the original creator of the cluster), and using Powershell. Using the On-Premises Gateway admin account did not work, because I was not logged in as it.

My steps:

> Install-Module -Name DataGateway


> Login-DataGatewayServiceAccount
WARNING: (False) MSAL 4.27.0.0 MSAL.NetCore Microsoft Windows 10.0.19043 [08/04/2021 04:55:55 - ] Exception type: Microsoft.Identity.Client.MsalUiRequiredException
, ErrorCode: user_null
HTTP StatusCode 0
CorrelationId

at Microsoft.Identity.Client.Internal.Requests.Silent.SilentRequest.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.Silent.SilentRequest.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)

 

you will get asked to log into your Office 365 account. Go ahead.

Next get the Cluster ID to remove:

> Get-DataGatewayCluster

Id : ################ your ID
Name : PowerBIgateway
etc etc

 

And using the ID, remove it:

 

> Remove-DataGatewayCluster -GatewayClusterId  ##YOUR ID##

Thanks Frank, that did it! 🙂

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.