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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Get all connection string for reports from power bi report server reportserver database

we try to get all connection string for all reports in power bi report server reportserver database. reportserver.dbo.DataModelDataSource table has all connection string, but it is encrypted, how we decrypt it?

 

 

7 REPLIES 7
josef78
Memorable Member
Memorable Member

Use standard PBIRS API, you can use e.g. PowerShell or Power BI Odata feed.

if odata feed, use https://servername/reports/api/v2.0/  URL and after navigate to PowerBIReports object

CDavies
Resolver I
Resolver I

Hi

 

Use the OData connector with the report server API.

 

Add your report server URL to this in the two places marked:

let

    Source = OData.Feed("https://<YOUR URL>/pbireports/api/v2.0/PowerBIReports", null, [Implementation="2.0"]),

    #"Expanded DataSources" = Table.ExpandTableColumn(Source, "DataSources", {"Id", "ModifiedBy", "ModifiedDate", "ConnectionString", "DataModelDataSource"}, {"DataSources.Id", "DataSources.ModifiedBy", "DataSources.ModifiedDate", "DataSources.ConnectionString", "DataSources.DataModelDataSource"}),

    #"Expanded DataSources.DataModelDataSource" = Table.ExpandRecordColumn(#"Expanded DataSources", "DataSources.DataModelDataSource", {"Type", "Kind", "AuthType", "Username", "ModelConnectionName"}, {"DataSources.DataModelDataSource.Type", "DataSources.DataModelDataSource.Kind", "DataSources.DataModelDataSource.AuthType", "DataSources.DataModelDataSource.Username", "DataSources.DataModelDataSource.ModelConnectionName"}),

    #"Added Conditional Column" = Table.AddColumn(#"Expanded DataSources.DataModelDataSource", "DS.Connection_String", each if [DataSources.ConnectionString] = null then "No Data Source" else [DataSources.ConnectionString]),

    #"Removed Columns" = Table.RemoveColumns(#"Added Conditional Column",{"CacheRefreshPlans", "AccessToken", "Roles", "ContentType", "Content", "ParentFolder", "Properties", "Comments", "AlertSubscriptions", "AllowedActions", "Policies", "DependentItems","Id", "ParentFolderId", "DataSources.Id", "DataSources.DataModelDataSource.ModelConnectionName"}),

    #"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"DataSources.ConnectionString", "DS.ConnectionString"}, {"DataSources.DataModelDataSource.Type", "DS.Type"}, {"DataSources.DataModelDataSource.Kind", "DS.Kind"}, {"DataSources.DataModelDataSource.AuthType", "DS.AuthType"}, {"DataSources.DataModelDataSource.Username", "DS.Username"}, {"DataSources.ModifiedBy", "DS.ModifiedBy"}, {"DataSources.ModifiedDate", "DS.ModifiedDate"}, {"Name", "Report"}, {"Path", "Report Path"}}),

    #"Add Report URL" = Table.AddColumn(#"Renamed Columns", "Report URL", each "https://<YOUR URL>/PBIReports/powerbi" & [Report Path] & "?rs:embed=true")

in

    #"Add Report URL"

 

 

Hi ,

 

I tried using above the OData connector with the report server API method and code, but it's throwing below error message when apply the change on Power Query Editor, could you please help me in this fixing this error. Thanks in advance 🙂

 

GopikrishnaJ_0-1697463968864.png

 

Anonymous
Not applicable

@CDavies  Hi, when i choose Odate feed (Get Data) from Power Bi, a message popup with credentials error, when i choose windows credentials, it says use anonamous, when i choose anonamous it throws an error,

 

does this work for anyone? I get an invalid character message after creating a .pbids with this....I also have a need to see all the unencrypted data sources and unable to get it to work?

It worked for me. Thanks, @CDavies  

Have a look at those links

 

List connection strings of all SSRS Shared Datasources 

decipher ReportServer.DataSource.ConnectionString 

Show connection string in the report? 




If my post solved your problem, mark my post as a solution to help others to quickly find it and also please give it a 👍

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.