Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi!
I am trying to get data from Azure Active Directory to Power BI Desktop. I though that would be easy through the Active Directory Connector. But that wasn't easy. After spending to much time on that I come over using Azure AD Graph in stead. That seems to work and the graph explorer was helpful.
https://graph.windows.net/{mytenant.Onmicrosoft.com}/users?api-version=1.6 gave me all users data. See code below. Take note of the field thumbnailPhoto@odata.mediaEditLink, it is a part of link to the picture. Adding https://graph.windows.net/{mytenant.Onmicrosoft.com}/ before this text we got a correct address to the picture. Then I though I could create this code below to get the picture perhaps as Base64 binary code, and hopefully could add this field in a chiclet slicer component or something to show the picture. The code below gave me an error
DataFormat.Error: We found extra characters at the end of JSON input.
Details:
Value=
Position=0
Perhaps it is a better way to get photos on power bi service/office365, but if any of you have a clue what is wrong and how to correct this I would be grateful
Regards Geir
let Source = Json.Document(Web.Contents("https://graph.windows.net/mytenant.OnMicrosoft.com/directoryObjects/af894aa1-9fad-4400-818b-580c7258a115/Microsoft.DirectoryServices.User/thumbnailPhoto?api-version=1.6")), value = Source[value], ConvertedtoTable = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error) in ConvertedtoTable
Hi geirf,
If you want to add image to powerbi from AAD, you could try to refer to Add Photos to Power BI from Active Directory for details.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
98 | |
76 | |
76 | |
48 | |
26 |