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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Help with SAS Token

Hi! Can someone who understands M language help me? The people in the sector responsible gave me a SAS Token to connect the BI to a DB. In BI, I clicked Web and Web From, inserted the 3 parts of the SAS Token and in HTTP request header I chose Accept and inserted "application / json; odata = nometadata", as per industry guidance.

 

MicrosoftTeams-image.png

 

Thus, BI brought a table of 1000, but the original table has 27000 rows.

I researched and found this site https://medium.com/@martijnlentink/azure-table-storage-in-power-bi-with-a-shared-access-signature-to... where the guy suggests a solution.

 

But even running the provided scripts, I was not successful. As I understand it, the scritp asks for 3 arguments, I made countless attempts but it didn't work. I don't understand what I should do. Could you help me with this, please?

 

Capture7.PNG

Capture8.PNG

Capture9.PNG

I'm trying with this script


let
Base64Encode = (str as text) => Binary.ToText (Text.ToBinary (str, BinaryEncoding.Base64)),
CreateContinuationTokens = (partitionkey as text, rowkey as text) =>
let
tokenPrefix = "1",
combineToken = "!",
encodedPartition = Base64Encode (partitionkey),
encodedRow = Base64Encode (rowkey),
nextPartKey = Text.Combine ({tokenPrefix, Text.From (Text.Length (encodedPartition)), encodedPartition}, combineToken),
nextRowKey = Text.Combine ({tokenPrefix, Text.From (Text.Length (encodedRow)), encodedRow}, combineToken),
result = [NextPartitionKey = nextPartKey, NextRowKey = nextRowKey]
in
result,
Func = (url as text, query as record, optional continuationTokens as record) =>
let
queryCombine = if continuationTokens = null then query else Record.Combine ({query, continuationTokens}),
result = Json.Document (Web.Contents (url, [Headers = [Accept = "application / json; odata = nometadata"], Query = queryCombine])),
resultAsList = result [value],
lastInList = List.Last (resultAsList),
tokens = CreateContinuationTokens (lastInList [PartitionKey], lastInList [RowKey]),
resultList = if List.Count (resultAsList)> 1 then List.Combine ({resultAsList, RecursiveTableStorage (url, query, tokens)}) else resultAsList
in
resultList
in
Func

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , if are looking for Token based Auth, refer if these can help
https://www.youtube.com/watch?v=f7HLyiAk-lQ
https://community.powerbi.com/t5/Desktop/Connect-to-data-with-API-token/td-p/731867
https://chris.koester.io/index.php/2015/07/16/get-data-from-twitter-api-with-power-query/
https://docs.microsoft.com/en-us/rest/api/power-bi/embedtoken

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.