We are trying to delete Power BI gateway by using PowerShell module or REST API.
We tried to use DataGateway PowerShell module to get the gateway first and remove it using the comdlets below.
It works well with my Azure accounts without any issue.
However, if we use the service principal, even if the service principal has the admin access to the PowerBI gateway,
the cmdlet is still not able to get the gateway or remove it. And I am getting unauthoried error.
Is that because the Power BI powershell moduel does not support Service Principal authencation?
Is there anyway we could automate this process?
Why would you want to automate that operation? You don't want to mess with a gateway configuration unless absolutely necessary. Removing a gateway cluster member should be done judiciously (and can be done via the admin center UI too).
This is a buiness requirement. We have one gateway for each customer and we would like to remove it once the customer is offboarded.
Yes, we noticed that the PowerShell cmdlet is able to remove the members
But we would like to remove the gateway itself as well, otherwise we will have heaps of gatway without being used anymore.
If you must - there is a choreography to it.
1. List all gateways and all cluster members
2. Identify the anchor member
3. for each gateway, remove the members that are NOT the anchor
4. remove the anchor member.
Hint: The gatewayObjectId of the anchor member is the clusterObjectID
Note: This only removes the meta data on the Power BI Service. It does not do anything to your VMs.
Does this mean we still could only remove the members from the gateway?
I am trying to remove the gateway itself by using PowerShell or REST API using Service Principal.
Thanks for the replies.
May I know what the anchor member is here?
We only have the Azure Service Principal Assigned to the Gateway, which is the admin for the gateway as well.
Is the Azure Service Principal the anchor member in this case?
Thanks for the reply.
What we are trying to do is to remove the whole gateway cluster by using service principal via PowerShell module or REST API, rather than removing individual gateway from the cluster.
Is it supported at the moment? If so, could we know what permissions are required for the service principal?
This cmdlet could remove the application gateway cluster though.
But it seems to be working with the actual Azure account, not the service principal?
Oh wow, they added a lot of new cmdlets. The cmdlet probable enumerates the cluster members and deletes them one by one for you. Fair enough.
As for the service principal question - i'll have to try that on our side. Don't see any mention of limitations at the moment.
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
Join the biggest FREE Business Applications Event in LATAM this February.
In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.