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

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.

Reply
nbrax
New Member

Get Data from specific Active Directory Domain Controller

Greetings Power BI community,

 

I am querying AD withPowerBi and have created some great reports using user.lastLogonTimestamp to identify stale accounts. However I want to get specific user login times (to understand if users are logging in at unusual times for example)  so need the most recent user.lastLogon values. I gather this attribute is not replicated between Domain Controllers (https://social.technet.microsoft.com/wiki/contents/articles/22461.understanding-the-ad-account-attri...), so I planned to query each of our 4 DCs, join the resulting tables and select each user's most recent user.lastLogon value, to give me their true last logon time.

 

At the moment, when I choose New Source > Active Directory, I can enter either a DC name or Domain Name, but regardless of which of our 4 DC names I use, I get the same values for user.lastLogon, suggesting I am only ever querying one DC. Is there a way to tell PowerBi which DC to query or to find out which DC it is querying?

 

Or am I missing something?
 

Thanks in advance,

4 REPLIES 4
pakorn269
Frequent Visitor

I'm facing the same problem as you. and find a way to stay

v-kelly-msft
Community Support
Community Support

Hi @nbrax ,

 

Check below reference for help:

https://www.youtube.com/watch?v=szLAmNZKCZ0

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Hi Kelly,

 

Thanks for the link to the video, which is a great introduction and helped me when I started out with this project. However, it does not answer the question of whether it is possible to query a specific Domain Controller from Power Bi.

 

Thanks,

Neil.

Hi  @nbrax ,

 

Check below reference and thread which may help:

https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-addomaincontroller?view=winse...

https://community.powerbi.com/t5/Desktop/Get-Data-Active-Directory/td-p/73726

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.