Forum Discussion
'InsufficientScopes' error while trying to create shortcut through Fabric REST API
- 1 year ago
Something definitely has changed in Fabric since yesterday. I faced a similar issue yesterday while retrieving connections information through FabricRestClient. The code was working fine until the previous day.
The way I got around it to explicitly initialize token using notebookutils.getToken and pass that in request headers. Your code does this for list_shortcuts whereas for create_sbortcuts it is not passing the explicit header. Initialize and add the request header to your create shortcuts method and it may work.
Something definitely has changed in Fabric since yesterday. I faced a similar issue yesterday while retrieving connections information through FabricRestClient. The code was working fine until the previous day.
The way I got around it to explicitly initialize token using notebookutils.getToken and pass that in request headers. Your code does this for list_shortcuts whereas for create_sbortcuts it is not passing the explicit header. Initialize and add the request header to your create shortcuts method and it may work.
- MathieuSGA1 year agoAdvocate I
Good call ! I'll give it a try as soon as possible and get back to you 😉.
[EDIT] Test was successful: solution accepted. Thanks again !Thanks for your time
- v-menakakota1 year agoCommunity Support
Hi MathieuSGA ,
Thanks for reaching out to the Microsoft fabric community forum.
We really appreciate your efforts and for letting us know the update on the issue. Reply back after trying the solution provided by the gaya3krishnan86 . I would also take a moment to thank  gaya3krishnan86 , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
Best Regards,
Menaka.
Community Support Team