Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

SQL Endpoint - Error 5 Access Denied

Hi!   I am having issues with my SQL endpoints. When running my dataflow Gen2s, I'm getting the following error:    I also cannot access the SQL endpoint in the lakehouse explorer:   ...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Anonymous ,

    Please take over SQL endpoint using Powershell scripts:

     # Install the Power BI PowerShell module if not already installed 
       Install-Module -Name MicrosoftPowerBIMgmt 
    
     # Import the Power BI PowerShell module 
       Import-ModuleMicrosoftPowerBIMgmt 
    
     # Connect to the Power BI service using the new owner credentials and take over the SQL Endpoint
    
       $workspaceid = "xxx"
       $sqlendpoint = "xxx"
    
       Connect-PowerBIServiceAccount
    
       $url = 'groups/' + $workspaceid + '/lhdatamarts/' + $sqlendpoint + '/takeover' 
       write-host $url 
       Invoke-PowerBIRestMethod -Url $url -Method Post -Body ""-Verbose 

    And check if it hit any following limitations:

    Best Regards