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.
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" };
Please note: only happens for shortcuts, other items works fine with the same code generated token
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
Check out the April 2024 Fabric update to learn about new features.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City