@Chilakapati Jyothirmayi : You can create a SAS token using Python and use it in Power BI to connect to a Azure storage account. While configuring the data source in Power BI choose the Authentication kind as Shared Access Signature (SAS).
The below mentioned code creates a SAS token that’s valid for one day and grants read access to the specified blob. Please replace blob_client and account_key with your actual blob client and account key.
from azure.storage.blob import BlobServiceClient, BlobClient, BlobSasPermissions, generate_blob_sas
import datetime
def create_service_sas_blob(blob_client: BlobClient, account_key: str):
# Create a SAS token that's valid for one day
sas_token = generate_blob_sas(
blob_client.account_name,
blob_client.container_name,
blob_client.blob_name,
account_key=account_key,
permission=BlobSasPermissions(read=True),
expiry=datetime.datetime.utcnow() + datetime.timedelta(days=1)
)
return sas_token