Forum Discussion

Rutvik_08's avatar
Rutvik_08
New Member
1 year ago
Solved

Permissions issue while calling a Rest API

Hi everyone, I'm trying to create a GitHub action which would help me bulk create tags in Power BI using the rest API bulk create tags but I'm running into a permissions issue when I try to call the API. I'm using a service principal account to call the API, the error that I'm getting is this: 

Status:{'requestId': '4f3f108f-ba9f-4d3c-81e7-57e611eaaa6b', 'errorCode': 'InsufficientScopes', 'message': 'The caller does not have sufficient scopes to perform this operation'}

 

Can somebody help with how to resolve this?

 

PS: I'm not Fabric Admin. 

 

  • Hi Rutvik_08 


    The InsufficientScopes error means your service principal lacks the necessary API permissions to call the Power BI REST API.

     

    In order to fix this, ensure your Azure AD app registration has the required Power BI permissions like Tenant.ReadWrite.All, grant admin consent, and request an access token with the correct scope and also confirm the service principal has proper workspace access.

     

    Did it work? πŸ‘ A kudos would be appreciated
    🟨 Mark it as a solution to help spread knowledge πŸ’‘

     

    🟩 Follow me on LinkedIn

  • Check your token at jws.ms , identify which scope is missing, and add only that scope to your app registration  (principle of least privilege).

5 Replies

  • Hi Rutvik_08 


    The InsufficientScopes error means your service principal lacks the necessary API permissions to call the Power BI REST API.

     

    In order to fix this, ensure your Azure AD app registration has the required Power BI permissions like Tenant.ReadWrite.All, grant admin consent, and request an access token with the correct scope and also confirm the service principal has proper workspace access.

     

    Did it work? πŸ‘ A kudos would be appreciated
    🟨 Mark it as a solution to help spread knowledge πŸ’‘

     

    🟩 Follow me on LinkedIn

  • Check your token at jws.ms , identify which scope is missing, and add only that scope to your app registration  (principle of least privilege).

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Rutvik_08,

     

    Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to lbendlin and DataVitalizer  for prompt and helpful responses.

     

    Just following up to see if the troubleshoot points provided by community members were helpful in addressing the issue.

    If one of the responses helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.

     

    Best regards,
    Prasanna Kumar

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Rutvik_08,

     

    Just following up to see if the response provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.

     

    Best regards,

    Prasanna Kumar

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Rutvik_08,

     

    Just following up to see if the troubleshoot points provided by community members were helpful in addressing the issue. If one of the responses helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.

     

    Best regards,
    Prasanna Kumar