---
title: "Data Share: connecting to Azure Blob or Table storage"
canonical: "https://support.vitec-hotellinx.com/space/KB/1069187077/Data%20Share%3A%20connecting%20to%20Azure%20Blob%20or%20Table%20storage"
format: markdown
---
Data is provided as eg. Azure Table storages for eg. Business Intelligence or as Blob shares

- Tables
  - BiReservations
  - BiReservationHistories
  - BiPostings
  - BiDailyStatistics
- Blobs
  - File shares (eg. exports from PMS)


---

## Authentication

You authenticate using a SAS token with table service query permissions (permissions to list tables and query table entities). You will be provided two authentication tokens for connecting to these tables which include both the table endpoint URI and SAS token. Which you use for connecting depends on how you wish to connect or as a matter of preference. Neither token specifies a particular table — you supply the table name when establishing a connection.

- **SAS URL** that targets the table service endpoint and includes the SAS token as a query string parameter. This is of the form   
`https://stdatasharexxxxxxxxxxxxx.table.core.windows.net/?sv=2015-04-05&ss=t&srt=sco&sp=rl&se=2050-01-01T00%3A00%3A00.0000000Z&spr=https&sig=xxx`
- **SAS connection string** that specifies as two separate properties the `TableEndpoint` and `SharedAccessSignature`. This is of the form `TableEndpoint=https://stdatasharexxxxxxxxxxxxx.table.core.windows.net/;SharedAccessSignature=sv=2015-04-05&ss=t&srt=sco&sp=rl&se=2050-01-01T00%3A00%3A00.0000000Z&spr=https&sig=xxx`

> ⚠️ **Warning:** These tokens are long-lived and provide read access to the table data. Treat the tokens as secrets and store them accordingly. Tokens can be rotated and renewed on request.

---

## Connecting

### Connect using Azure Storage Explorer

Azure Storage Explorer allows you to browse Azure Table storage tables using a desktop application. The application is available for Windows, macOS and Linux.

You can attach the storage account and tables to Azure Storage Explorer using the SAS connection string or SAS URL.

1. Select the connect icon from the left then connect to *Storage Account or Service*
2. Choose *Connection String* or *Shared Access Signature*
3. Give the connection a friendly name and enter the SAS connection string or SAS URL depending on which method you selected
4. The tables or blobs etc. are visible and queryable in storage explorer eg.

  
  
  
If you have storage explorer version 1.42.0 or later you can use SAS direct links. Just take your SAS URL and replace the protocol/scheme with `storageexplorer://` for example:

```
storageexplorer://stdatasharexxxxxxxxxxxxx.table.core.windows.net/?sv=2015-04-05&ss=t&srt=sco&sp=rl&se=2050-01-01T00%3A00%3A00.0000000Z&spr=https&sig=xxx
```

Opening this link will automatically mount the table service and both tables. For example on macOS:

```shell
open 'storageexplorer://stdatasharexxxxxxxxxxxxx.table.core.windows.net/?sv=2015-04-05&ss=t&srt=sco&sp=rl&se=2050-01-01T00%3A00%3A00.0000000Z&spr=https&sig=xxx'
```

---

### Connect using Azure CLI

You can use the Azure CLI to download Azure table entities from the command line. Azure CLI is available for Windows, macOS and Linux. The command `az storage entity query` can be used to query all or select entities in a table. For example to download all BiReservations entities into a newline delimited JSON file:

```shell
az storage entity query --table-name 'BiReservations' --connection-string \
'TableEndpoint=https://stdatasharexxxxxxxxxxxxx.table.core.windows.net/;SharedAccessSignature=sv=2015-04-05&amp;ss=t&amp;srt=sco&amp;sp=rl&amp;se=2050-01-01T00%3A00%3A00.0000000Z&amp;spr=https&amp;sig=xxx' \
| jq -c '.items[]' > BiReservations.jsonl
```

---

### Connect using Azure Data Factory or Microsoft Fabric

You can connect to tables using the Azure Data Factory or Microsoft Fabric connectors.

---

### Connect using Microsoft provided SDKs (.NET / Python / Node.js / Java / Go)

You can use Microsoft published SDK libraries for .NET, Python, Node.js, Java and Go to connect to Azure Storage tables. Note that even though the linked Microsoft quickstart documentation are for Azure Cosmos DB (Microsoft's premium offering for Table API), the same SDK library is compatible with Azure Storage tables.

Below is an example using .NET to query all data (empty filter) in the BiReservations Azure Storage table using a SAS connection string. Asynchronously iterating the QueryAsync returned AsyncPageable automatically handles continuation token based paging, so the below example allows querying all the table data without limits.

```csharp
using Azure.Data.Tables;

var sasConnectionString =
"TableEndpoint=https://stdatasharexxxxxxxxxxxxx.table.core.windows.net/;SharedAccessSignature=sv=2015-04-05&amp;ss=t&amp;srt=sco&amp;sp=rl&amp;se=2050-01-01T00%3A00%3A00.0000000Z&amp;spr=https&amp;sig=xxx";

var sasConnectionStringClient = new TableClient(sasConnectionString, "BiReservations");
Console.WriteLine($"Querying data in {sasConnectionStringClient.Name}...");

await foreach (var tableEntity in sasConnectionStringClient.QueryAsync&lt;TableEntity&gt;(filter: ""))
{
    Console.WriteLine($"PartitionKey={tableEntity.PartitionKey} RowKey={tableEntity.RowKey}");
}
```

---

### Connect using the REST API

Azure Storage provides a REST API for working with tables without using an SDK library. The Query Entities operation can be used to query all or some of the table data using supported query syntax.

Below is an example of querying all table data for the BiReservations table. Important notes:

- You need to add the table name after the storage account resource URI and the table name must be suffixed with `()` for the query operation (in contrast to an entity point read).
- You should include the `x-ms-version` header to define the service version (below we use the latest version as of this writing `2026-02-06`).
- You should include the `Accept` header to define the payload format. Below we use `application/json;odata=nometadata` to return JSON without additional metadata such as ETag version identifiers or property types.

```shell
curl -fsS 'https://stdatasharexxxxxxxxxxxxx.table.core.windows.net/BiReservations()?sv=2015-04-05&ss=t&srt=sco&sp=rl&se=2050-01-01T00%3A00%3A00.0000000Z&amp;spr=https&sig=xxx' \
-H 'x-ms-version: 2026-02-06' -H 'Accept: application/json;odata=nometadata' \
| jq '.value'
```

If the query returns more than 1000 entities the response will include continuation token headers that can be used to retrieve the next batch of entities. If this is the case you need to map the `x-ms-continuation-NextPartitionKey` and `x-ms-continuation-NextRowKey` response headers as `NextPartitionKey` and `NextRowKey` query string parameters in follow up requests.

Below is an example PowerShell script to load all paged entities:

```powershell
$sasUri = 'https://stdatasharexxxxxxxxxxxxx.table.core.windows.net/BiReservations()?sv=2015-04-05&amp;ss=t&amp;srt=sco&amp;sp=rl&amp;se=2050-01-01T00%3A00%3A00.0000000Z&amp;spr=https&amp;sig=xxx'

# query all entities with paging
$entities = [Collections.Generic.Dictionary[[ValueTuple[string,string]],object]]::new()
$nextPartitionKey = $null
$nextRowKey = $null

do {
    $pageUri = $sasUri
    if ($nextPartitionKey) {
        $pageUri += "&amp;NextPartitionKey=$([uri]::EscapeDataString($nextPartitionKey))"
    }
    if ($nextRowKey) {
        $pageUri += "&amp;NextRowKey=$([uri]::EscapeDataString($nextRowKey))"
    }

    $entitiesPage = Invoke-RestMethod `
        -Uri $pageUri `
        -Headers @{ 'x-ms-version' = '2026-02-06'; 'Accept' = 'application/json;odata=nometadata' } `
        -ResponseHeadersVariable 'responseHeaders'

    foreach ($entity in $entitiesPage.value) {
        $entities.TryAdd([ValueTuple[string,string]]::new($entity.PartitionKey, $entity.RowKey), $entity) | Out-Null
    }

    $nextPartitionKey = $responseHeaders.'x-ms-continuation-NextPartitionKey'
    $nextRowKey = $responseHeaders.'x-ms-continuation-NextRowKey'

    Write-Host "Got page of $($entitiesPage.value.count) entities and total of $($entities.count) entities."
} while ($nextPartitionKey -or $nextRowKey)

# show entities
$entities.Values | Format-Table -Auto
```

---

### Connect using Power BI

The Power BI Power Query connector for Azure Table storage does not currently support shared access signature authentication and therefore cannot be used for loading table data using the provided tokens. As an alternative you will need to stage the table data to a supported data source using a mechanism listed above.