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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Nch0000
New Member

If I delete On Premises data gateway Will I lose credentials for data sources.

I have to uninstall on premises gateway and I am trying to not lose the credentials for the data sources I use for power bi reports,
If I am not able to migrate the gateway to other machine, am I gonna lose credentials If I unistall this one and Install new One? 
I can not Migrate it Since I lost the recovery key, But I think the recovery key should be on the machine on which the gateway is installed right?

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

You have to keep the physical and logical parts of the gateway separate.

 

Uninstalling a gateway service from a VM is purely physical. It has no impact whatsoever on the gateway definitions (including the connections and credentials). Of course you will mess with the load balancer, but that can be mitigated by temporarily disabling the cluster member you are doing maintenance on.

 

The moment you get in in trouble is when you remove the reference to the anchor gateway from the Power BI Service gateway admin side - at that point the entire gateway will be logically removed and all connections will be lost, irretrievably.

View solution in original post

Anonymous
Not applicable

Your ideas is so great lbendlin

Hi, @Nch0000 

If we uninstall the gateway directly on the machine, we will still be able to keep our gateway connection in the Power BI service:

vjianpengmsft_0-1726724358368.png

After we uninstall the gateway in the computer, it will show offline:

vjianpengmsft_1-1726724518153.png

vjianpengmsft_2-1726724571533.png

We can recover this data gateway in another computer via recoverkey:

Migrate, restore, or take over an on-premises data gateway | Microsoft Learn

vjianpengmsft_3-1726724637325.png

vjianpengmsft_4-1726724697422.png

 

If we remove this gateway in Power BI Service:

vjianpengmsft_5-1726724788897.png

As you can see, the SQL Server gateway connection we established with this gateway above will all be deleted, and all connection credentials will be lost.

vjianpengmsft_6-1726724836047.png

You mentioned that you forgot your gateway recoverkey, below there is a recovery of your data source credentials to the new gateway without the need for recoverkey:

LOST POWER BI GATEWAY RECOVERY KEY? NO PROBLEM - Ruki's Blog (rukiatu.com)

vjianpengmsft_7-1726725040985.png

Mainly through PowerShell to bind the gateway connection of the old gateway into the new gateway. You can learn about these PowerShell cmdlets through the links below.

Invoke-PowerBIRestMethod (MicrosoftPowerBIMgmt.Profile) | Microsoft Learn

vjianpengmsft_8-1726725259661.png

Datasets - Bind To Gateway In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

vjianpengmsft_9-1726725423453.png

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Your ideas is so great lbendlin

Hi, @Nch0000 

If we uninstall the gateway directly on the machine, we will still be able to keep our gateway connection in the Power BI service:

vjianpengmsft_0-1726724358368.png

After we uninstall the gateway in the computer, it will show offline:

vjianpengmsft_1-1726724518153.png

vjianpengmsft_2-1726724571533.png

We can recover this data gateway in another computer via recoverkey:

Migrate, restore, or take over an on-premises data gateway | Microsoft Learn

vjianpengmsft_3-1726724637325.png

vjianpengmsft_4-1726724697422.png

 

If we remove this gateway in Power BI Service:

vjianpengmsft_5-1726724788897.png

As you can see, the SQL Server gateway connection we established with this gateway above will all be deleted, and all connection credentials will be lost.

vjianpengmsft_6-1726724836047.png

You mentioned that you forgot your gateway recoverkey, below there is a recovery of your data source credentials to the new gateway without the need for recoverkey:

LOST POWER BI GATEWAY RECOVERY KEY? NO PROBLEM - Ruki's Blog (rukiatu.com)

vjianpengmsft_7-1726725040985.png

Mainly through PowerShell to bind the gateway connection of the old gateway into the new gateway. You can learn about these PowerShell cmdlets through the links below.

Invoke-PowerBIRestMethod (MicrosoftPowerBIMgmt.Profile) | Microsoft Learn

vjianpengmsft_8-1726725259661.png

Datasets - Bind To Gateway In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

vjianpengmsft_9-1726725423453.png

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

You have to keep the physical and logical parts of the gateway separate.

 

Uninstalling a gateway service from a VM is purely physical. It has no impact whatsoever on the gateway definitions (including the connections and credentials). Of course you will mess with the load balancer, but that can be mitigated by temporarily disabling the cluster member you are doing maintenance on.

 

The moment you get in in trouble is when you remove the reference to the anchor gateway from the Power BI Service gateway admin side - at that point the entire gateway will be logically removed and all connections will be lost, irretrievably.

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.