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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
asankab
Helper I
Helper I

Error when creating a shortcut The caller does not have sufficient scopes to perform this operation

Hi Team,,

 

When creating a shortcut (via API) from a token generated from code it says - "{\"requestId\":\"111111\",\"errorCode\":\"InsufficientScopes\",\"message\":\"The caller does not have sufficient scopes to perform this operation\"}"

 

but when i used the token from the Microsoft's API Documentation UI and use it in the code the request pass through and the shortcuts get created

 

These are the scopes set in code for the token

string[] scopes = new string[] { 
  "https://api.fabric.microsoft.com/Workspace.ReadWrite.All " +
  "
https://api.fabric.microsoft.com/Item.ReadWrite.All" };

 

this seems like a permission/scope issues to me for the token generated from code. have you encounte...

 

Please note: only happens for shortcuts, other items works fine with the same code generated token

6 REPLIES 6
v-cboorla-msft
Community Support
Community Support

Hi @asankab 

 

Thanks for using Microsoft Fabric Community.

 

As I understand that you are encountering an issue related to insufficient scopes when creating shortcuts in Microsoft Fabric via an API. The error message "InsufficientScopes" indicates that the token generated from your code lacks the necessary permissions to create shortcuts using the Microsoft Fabric API. However, when you use a token generated from Microsoft’s API Documentation UI, the request succeeds and shortcuts are created.

 

The scopes you've defined in your code ("https://api.fabric.microsoft.com/Workspace.ReadWrite.All" and "https://api.fabric.microsoft.com/Item.ReadWrite.All") seem sufficient for general operations, but they might not include the specific permission required for creating shortcuts.

 

Scopes are used to determine what APIs an app has access to. But if you use an app that doesn't have Dataset.ReadWrite.All scopes defined for it the app's call to the API which requires Dataset.ReadWrite.All will fail due to insufficient scopes.

In the code, could you please update the permissions to include 'Dataset.ReadWrite.All' and retest the shortcut creation process.

If the issue still persists, please do let us know. Glad to help.

 

I hope this information helps.

 

Thank you.

Hi @asankab 

 

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.
In case if you have any resolution please do share that same with the community as it can be helpful to others.
Otherwise, will respond back with the more details and we will try to help.

 

Thanks.

No, I am getting the same error, even after including the https://api.fabric.microsoft.com/Dataset.ReadWrite.All

 

{"requestId":"xxxx","errorCode":"InsufficientScopes","message":"The caller does not have sufficient scopes to perform this operation"}

Hi @asankab 

 

Apologies for the inconvenience.

Please reach out to our support team to gain deeper insights and explore potential solutions. It's highly recommended that you reach out to our support team. Their expertise will be invaluable in suggesting the most appropriate approach.

Please go ahead and raise a support ticket to reach our support team:

https://support.fabric.microsoft.com/support

After creating a Support ticket please provide the ticket number as it would help us to track for more information.

 

Thank you.

Hi @asankab 

 

We haven’t heard from you on the last response and was just checking back to see if you've had a chance to submit a support ticket. If you have, a reference to the ticket number would be greatly appreciated. This will allow us to track the progress of your request and ensure you receive the most efficient support possible.

 

Thanks.

Hi v-cboorla-msft,

 

Thanks for the information, I will log a support tiecket and let you know the number in here in the next couple of days

 

Thanks 

Helpful resources

Announcements
April Fabric Update Carousel

Fabric Monthly Update - April 2024

Check out the April 2024 Fabric update to learn about new features.

Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors