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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors