Forum Discussion

Trish_Rye's avatar
Trish_Rye
Helper I
1 year ago
Solved

REST API GetUnusedArtifactsAsAdmin change / bug?

Hello,

 

We are using this REAST API: GetUnusedArtifactsAsAdmin (https://learn.microsoft.com/en-us/rest/api/power-bi/admin/groups-get-unused-artifacts-as-admin) for getting unused datasets.

 

We have witnessed a sudden drop between the numbers we obtained in April (around 6000 datasets) and the end of May (around 100). We didn't conduct any cleanup in the meantime and our ps script didn't change, they don't throw any errors either. Has any of you experienced a similar problem? Do you know if something was changed in the REST API? Maybe criteria? I believe unused was 'not refreshed, not even with a failure' and 'not queried". Or maybe there is a bug, like problems with storing / collecting data by MS on the usage of datasets? I haven't found anything on the subject of this REST API in Power BI blog.

Unfortunately this REST API  been in preview status for a few years now.

If it wasn't a problem with rest api, maybe you have an idea what could have happened with data? Or how we could try checking it.

Thank you in advance or your help

5 Replies

  •  

    •  

      • Check Dataset Refresh History:
        Use REST API or Power BI portal to see recent refreshes for those datasets.
      • Review Query Activity Logs:
        Audit logs or usage metrics can help detect if datasets were accessed.
      • Verify Workspace Membership & Permissions:
        Confirm that the admin account running the API has visibility on all relevant workspaces/datasets.
      • Use Power BI Audit Logs (via Microsoft 365 Compliance):
        Query activity for datasets to see if there were recent queries not reflected in the API.
      • Run the API on Smaller Scopes:
        Try with a specific workspace or dataset group to isolate where data changes occur.

       

       

     

  • Hi Trish_Rye

     

    A drop from ~6000 >> ~100 usually means the backend telemetry/criteria for “unused” shifted (any recent view/query/refresh now counts as “used”), not that your script broke.

    Sanity checks

    • Confirm the caller still has admin/SPN visibility to all workspaces (incl. new Fabric workspaces/capacities).

    • Cross-check with Admin Activity Events (last 60–90 days) for ExecuteQuery, ViewReport, Refresh by DatasetId.

    • Spot-check a few workspaces: compare this API vs. refresh history + activity events.

    • Run on smaller scopes to rule out throttling/sampling.

    • If the counts still don’t line up, it’s likely a preview regression >> open a Microsoft support ticket with sample DatasetIds and timestamps.

  • Trish_Rye 

    API documentation does not indicate any change, Not sure if Microsoft has done any change from their end. 

    As rohit1991 suggested, you can log a microsoft support ticket and get help from them.

    Meanwhile if you want to investigate on your own, I would suggest you to extract the audit events of last 30 days

    https://learn.microsoft.com/en-us/rest/api/power-bi/admin/get-activity-events

    and then check if there any activities which could be the reason for this 

     

     

     

     

     

    Connect on LinkedIn

     

     

     








    Did I answer your question? Mark my post as a solution!
    If I helped you, click on the Thumbs Up to give Kudos.

    Proud to be a Super User!


  • v-saisrao-msft's avatar
    v-saisrao-msft
    Community Support

    Hi Trish_Rye,

    Could you please confirm if the issue was resolved after raising a support case? If so, we’d appreciate it if you could share the solution to help others in the community. As we haven’t heard back, we’re closing this thread. For any further issues, please raise a new thread in the Microsoft Fabric Community Forum — we’ll be happy to assist.

    Thank you for being part of the Microsoft Fabric Community.