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
collabdays lisbon

CollabDays Lisbon - 26 November 2022

Sessions include practical, hands-on experience that will help you take the next step in your career and know-how.

Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors