cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MichaelU
Regular Visitor

Power Bi workspace content overview

Hi,

 

Is there a way to have some overview showing what reports/dashboards/apps we have in workspace and some basic info about them? Lets say that we have 100 reports and we distribute it to users. I would like some overview for users where they could find basic infos about those 100 reports so they navigate much easier. 

 

One solution is perhaps to have one report dedicated to just this info and have there table chart with info. But is there other solution, dynamic possibly?

 

Thank you

Michael 

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @MichaelU ,

 

A. First create an application in Azure, then create the following query in Power BI Desktop.

         

1. Obtain dynamic access token.

 

() =>
let 
    body = "grant_type=password&&resource=https://analysis.windows.net/powerbi/api&&response_type=code&&client_id=xxxxxxxxxxx&&client_secret=xxxxxxxxx&&username=xxxxxxxx&&password=xxxxxx",
    Data=Json.Document(Web.Contents("https://login.microsoftonline.com/common/oauth2/token/",
        [Headers=[#"Content-Type"="application/x-www-form-urlencoded"], Content=Text.ToBinary(body)])),
    access_token = Data[access_token]
in 
    access_token

vkkfmsft_0-1645423060397.png

 

2. Call Dashboards - Get Dashboards In Group api to return the list of dashboards.

 

let 
    Source = Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/groups/{your group id}/dashboards", [Headers=[Authorization="Bearer "& GetAccessToken() ]])),
    value = Source[value],
    #"Converted to Table" = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "displayName", "isReadOnly", "webUrl", "embedUrl", "dataClassification", "users", "subscriptions"}, {"id", "displayName", "isReadOnly", "webUrl", "embedUrl", "dataClassification", "users", "subscriptions"})
in
    #"Expanded Column1"

image.png

 

3. Call Reports - Get Reports In Group api to return the list of reports.

 

let
    Source = Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/groups/{your group id}/reports", [Headers=[Authorization="Bearer "& GetAccessToken() ]])),
    value = Source[value],
    #"Converted to Table" = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "reportType", "name", "webUrl", "embedUrl", "isFromPbix", "isOwnedByMe", "datasetId", "datasetWorkspaceId", "users", "subscriptions"}, {"id", "reportType", "name", "webUrl", "embedUrl", "isFromPbix", "isOwnedByMe", "datasetId", "datasetWorkspaceId", "users", "subscriptions"})
in
    #"Expanded Column1"

image.png

 

4. Call Apps - Get Apps api to return the installed app.

 

let
    Source = Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/apps", [Headers=[Authorization="Bearer "& GetAccessToken() ]])),
    value = Source[value],
    #"Converted to Table" = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "name", "lastUpdate", "description", "publishedBy", "workspaceId", "users"}, {"id", "name", "lastUpdate", "description", "publishedBy", "workspaceId", "users"})    
in
    #"Expanded Column1"

image.png

 

B. Upload the report to Service and configure refresh.

 

1. Enable option "Allow user's cloud data sources to refresh through this gateway cluster. These cloud data sources do not need to be configured under this gateway cluster" in the gateway settings.

 

image.png

 

2. Add three API data sources to the gateway and make sure "Skip Test Connection" is checked.

 

image.png

 

3. Select the corresponding gateway data source for the API, and edit the credentials for the Get Token data source under Data source credentials.

 

image.png

 

4. Then you can refresh the dataset successfully.

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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

1 REPLY 1
v-kkf-msft
Community Support
Community Support

Hi @MichaelU ,

 

A. First create an application in Azure, then create the following query in Power BI Desktop.

         

1. Obtain dynamic access token.

 

() =>
let 
    body = "grant_type=password&&resource=https://analysis.windows.net/powerbi/api&&response_type=code&&client_id=xxxxxxxxxxx&&client_secret=xxxxxxxxx&&username=xxxxxxxx&&password=xxxxxx",
    Data=Json.Document(Web.Contents("https://login.microsoftonline.com/common/oauth2/token/",
        [Headers=[#"Content-Type"="application/x-www-form-urlencoded"], Content=Text.ToBinary(body)])),
    access_token = Data[access_token]
in 
    access_token

vkkfmsft_0-1645423060397.png

 

2. Call Dashboards - Get Dashboards In Group api to return the list of dashboards.

 

let 
    Source = Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/groups/{your group id}/dashboards", [Headers=[Authorization="Bearer "& GetAccessToken() ]])),
    value = Source[value],
    #"Converted to Table" = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "displayName", "isReadOnly", "webUrl", "embedUrl", "dataClassification", "users", "subscriptions"}, {"id", "displayName", "isReadOnly", "webUrl", "embedUrl", "dataClassification", "users", "subscriptions"})
in
    #"Expanded Column1"

image.png

 

3. Call Reports - Get Reports In Group api to return the list of reports.

 

let
    Source = Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/groups/{your group id}/reports", [Headers=[Authorization="Bearer "& GetAccessToken() ]])),
    value = Source[value],
    #"Converted to Table" = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "reportType", "name", "webUrl", "embedUrl", "isFromPbix", "isOwnedByMe", "datasetId", "datasetWorkspaceId", "users", "subscriptions"}, {"id", "reportType", "name", "webUrl", "embedUrl", "isFromPbix", "isOwnedByMe", "datasetId", "datasetWorkspaceId", "users", "subscriptions"})
in
    #"Expanded Column1"

image.png

 

4. Call Apps - Get Apps api to return the installed app.

 

let
    Source = Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/apps", [Headers=[Authorization="Bearer "& GetAccessToken() ]])),
    value = Source[value],
    #"Converted to Table" = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "name", "lastUpdate", "description", "publishedBy", "workspaceId", "users"}, {"id", "name", "lastUpdate", "description", "publishedBy", "workspaceId", "users"})    
in
    #"Expanded Column1"

image.png

 

B. Upload the report to Service and configure refresh.

 

1. Enable option "Allow user's cloud data sources to refresh through this gateway cluster. These cloud data sources do not need to be configured under this gateway cluster" in the gateway settings.

 

image.png

 

2. Add three API data sources to the gateway and make sure "Skip Test Connection" is checked.

 

image.png

 

3. Select the corresponding gateway data source for the API, and edit the credentials for the Get Token data source under Data source credentials.

 

image.png

 

4. Then you can refresh the dataset successfully.

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show episode 9

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors
Top Kudoed Authors