Forum Discussion

MathieuSGA's avatar
MathieuSGA
Advocate I
1 year ago
Solved

'InsufficientScopes' error while trying to create shortcut through Fabric REST API

Hi,   Few weeks ago, I was using the following process without any trouble but can't seem to figure out what went wrong. Any changes in permission ? credentials ? I'm not particular at ease with ...
  • gaya3krishnan86's avatar
    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.