Forum Discussion

KathiravanTnj's avatar
KathiravanTnj
New Member
1 year ago
Solved

Export the Connection name from On-premises Gateway

I need assistance with exporting the connection names from an On-premises Data Gateway. Specifically, I am looking for a method to extract these names for further querying and analysis. Could you please provide guidance on the best approach to achieve this, including any available tools or scripts?

  • Hi KathiravanTnj ,

    To export connection names from an On-premises Data Gateway, the best approach is to use the Power BI REST API in combination with PowerShell or a tool like Postman.

     

    Specifically, you can use the Get Datasources and Get DatasourceByGateway endpoints to retrieve a list of all connections configured on a particular gateway. To do this, you'll need to authenticate using an Azure AD token and ensure you have appropriate permissions (Gateway Admin or Power BI Service Admin). Once authenticated, the API will return metadata including datasource names, types, and connection details which you can export to a CSV or integrate into another system for analysis.

     

    Microsoft doesn't currently offer a direct UI-based export, so scripting is the most flexible and efficient method. If needed, sample PowerShell scripts are available to automate the API calls and extract the relevant details. Let me know if you'd like help customizing a script for your environment.

  • Hi KathiravanTnj  ,

     

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
    If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.


    Regards,

    Chaithanya.

3 Replies

  • Hi KathiravanTnj ,

    To export connection names from an On-premises Data Gateway, the best approach is to use the Power BI REST API in combination with PowerShell or a tool like Postman.

     

    Specifically, you can use the Get Datasources and Get DatasourceByGateway endpoints to retrieve a list of all connections configured on a particular gateway. To do this, you'll need to authenticate using an Azure AD token and ensure you have appropriate permissions (Gateway Admin or Power BI Service Admin). Once authenticated, the API will return metadata including datasource names, types, and connection details which you can export to a CSV or integrate into another system for analysis.

     

    Microsoft doesn't currently offer a direct UI-based export, so scripting is the most flexible and efficient method. If needed, sample PowerShell scripts are available to automate the API calls and extract the relevant details. Let me know if you'd like help customizing a script for your environment.

  • v-kathullac's avatar
    v-kathullac
    Icon for Community Support rankCommunity Support

    Hi KathiravanTnj  ,

     

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
    If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.


    Regards,

    Chaithanya.