Forum Discussion

rohitsawane's avatar
rohitsawane
Regular Visitor
1 year ago

Power BI Monitoring Implementation Issues with Fetch Catalog and Fetch Graph Scripts

I am currently implementing Power BI monitoring as outlined by Rui Romano. My goal is to extract logs and store them on my local system using PowerShell scripts, specifically the 'Fetch Activity', 'Fetch Catalog', 'Fetch DatasetRefresh', and 'Fetch Graph' scripts provided in the GitHub Repository  i.e. public repository.

So far, I have successfully executed the 'Fetch Activity' and 'Fetch DatasetRefresh' scripts and have connected the extracted data from these activities to the Power BI template file available in the GitHub repository at the end of the page(Ref Image Steps to Execute PBIMonitoring ).

However, I am encountering issues with the 'Fetch Catalog' and 'Fetch Graph' scripts. For the 'Fetch Catalog' script, I am receiving a "missing braces" error(Ref Image Error_On_FetchCatalog), and even after resolving that issue, I am unable to connect the generated data from the catalog to the Power BI template due to missing workspace-related information.

Regarding the 'Fetch Graph' script, I am facing a "403 Forbidden" error (Ref Image Error_on_FetchGraphps1) , which appears to be related to the permissions assigned to the service principal. I have already added the following permissions to the service principal(Ref Image ServicePrincipalPermissions)

Could you please provide assistance with the 'Fetch Catalog' and 'Fetch Graph' scripts, as well as guidance on the necessary permissions that need to be added to the service principal? Any help or suggestions would be greatly appreciated.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi rohitsawane ,

     

    Thanks for reaching out.

    Please go through the script line by line to ensure all braces are correctly placed.
    You can use an IDE or text editor that highlights matching braces to help identify issues.

     

    The "403 Forbidden" error usually relates to permission issues. 
    Ensure the service principal has the necessary permissions. For the 'Fetch Graph' script, you typically need:
    User.Read.All
    Directory.Read.All
    Reports.Read.All
    Also make sure the permissions have been granted admin consent in the Azure portal.

     

    In addition, ensure that the token you are using has the correct scopes. 

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.