Forum Discussion

andrjohns's avatar
andrjohns
Icon for Helper II rankHelper II
4 years ago

PBI Dataflow Internal Storage - Blob SAS Permissions

Hi All,

 

Following the steps in this forum post, I've been able to generate a Blob Storage shared access signature (SAS) for accessing the .csv files for the tables within a given dataflow, using a POST query to the `storageAccess` endpoint for the dataflow with the body:

 

 

{
  "TokenLifetimeInMinutes" = 1440,
  "Permissions" = "Read",
  "EntityName" = {table_name}
}

 

 

However, this endpoint only appears to support requesting SAS keys with either "Read" or "List" permissions. Is it possible to request both "Read" AND "List" permissions? All attempts at specifying two permissions have returned errors, or just defaulted to only "Read" permissions.

 

Thanks!
Andrew

4 Replies

  • v-cazheng-msft's avatar
    v-cazheng-msft
    Icon for Community Support rankCommunity Support

    Hi andrjohns

     

    You may try to make some changes to your code like this.

    {
    
      "TokenLifetimeInMinutes" = 1440,
    
      "Permissions" =[ "Read","List" ],
    
      "EntityName" = {table_name}
    
    }

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me. Thanks a lot!

     

    Best Regards,

    Community Support Team _ Caiyun

    • andrjohns's avatar
      andrjohns
      Icon for Helper II rankHelper II

      Thanks for the reply! Unfortunately that also returns an error, as it appears the endpoint is expecting a single value for the Permissions field:

      Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Microsoft.PowerBI.ServiceContracts.Version201606.Cdsa.CdsaAccessTokenPermissions' because the type requires a JSON primitive value (e.g. string, number, boolean, null) to deserialize correctly.
      To fix this error either change the JSON to a JSON primitive value (e.g. string, number, boolean, null) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.

       

      • v-cazheng-msft's avatar
        v-cazheng-msft
        Icon for Community Support rankCommunity Support

        Hi andrjohns,

         

        Yean, it seems like the server side only accept one permission parameter one time. How about separately retrieve Read/List permission data and then do filters on the result set?

         

        If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

         

        Best Regards,

        Community Support Team _ Caiyun