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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Charles001
Frequent Visitor

Retrieving an IdentityBlob token for a specific user

We are embedding a Power BI report using the embed for your customers application process

 

The RLS has been set up on the Azure side but we are struggling to generate an IdentityBlob token for a user in the python code.

 

IdentityBlob: a blob for specifying the identity. Only supported for datasets with Direct Query connection to SQL Azure

 

So,

To use token-based identity, you first need to get an AAD access token, and then add it into the ‘identitiyBlob’ property when generating the embed token:

{
"accessLevel": "View",
"identities": [
{
"datasets": [ "fe0a1aeb-f6a4-4b27-a2d3-b5df3bb28bdc"],
         “identityBlob”: {
“value”: “eyJ0eXAiOiJKV1QiLCJh….”
}
}
]
}

 

How does one programmatically "get" the AAD access token to place in the value placeholder for "identityBlob"?

 

Can anyone recommend a way of retrieveing the IdentityBlob using JSON / Python? Or direct to a website with this information?

 

Many thanks.

 

We are following the information on this page

 

2 REPLIES 2
v-yetao1-msft
Community Support
Community Support

Hi @Charles001 

I searched in Forums and MS documents and found some related cases and operating steps, you can refer to them .

https://docs.microsoft.com/en-us/power-bi/developer/automation/walkthrough-push-data-get-token

https://community.powerbi.com/t5/Developer/problem-getting-authentication-token-from-AAD/m-p/333691

 

Best Regards

Community Support Team _ Ailsa Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors