querying active directory from ssrs

21
Querying Active Directory From SSRS To Customize The User Experience And Secure Reports

Upload: kevork

Post on 23-Feb-2016

26 views

Category:

Documents


1 download

DESCRIPTION

Querying Active Directory From SSRS. To Customize The User Experience And Secure Reports. Introduction. Wes Springob (No relation to Mr. Squarepants ) BI Consultant at New York Life Originally from Pittsburgh, now New Port Richey Wife Ashley, Portrait Photographer http :// SQLWes.com - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Querying Active Directory From  SSRS

Querying Active Directory From SSRSTo Customize The User Experience And Secure Reports

Page 2: Querying Active Directory From  SSRS

IntroductionWes Springob(No relation to Mr. Squarepants)BI Consultant at New York Life Originally from Pittsburgh, now New Port RicheyWife Ashley, Portrait Photographer

http://SQLWes.com

http://twitter.com/SQLWes

http://LinkedIn.com/in/SQLWes

Page 3: Querying Active Directory From  SSRS

Disclosure: Extensive use of SSRS Proficient T-SQL Developer LDAP novice 0 AD administration experience Recently exploring reporting of data sources that aren’t SQL Server Have been wanting to work with AD Data in SSRS for years, but only recently have had

the opportunity. The names have been changed to protect the innocent = No live demo of

Active Directory

Page 4: Querying Active Directory From  SSRS

Use Case Why would you need to secure a report with AD? Doesn’t the Report Server do that for you?

Short answer, yes it does:

Page 5: Querying Active Directory From  SSRS

We can do more

Page 6: Querying Active Directory From  SSRS

System of recordMany database systems store a user’s Active Directory ID. But they also store a lot more, unfortunately, to “support” the application. Where in most cases, we should be going back to query AD to ensure we are using the most current values.

Page 7: Querying Active Directory From  SSRS

Tools A SQL Server with SSRS installedManagement StudioVisual Studio, BIDS or Report Builder to create RDL’sActive Directory Explorer

1. Aids in writing LDAP queries2. Free tool, downloadable from Technet3. Any domain account typically has sufficient, Read Only, rights

to query AD

Page 8: Querying Active Directory From  SSRS

ApproachesLinked Servers / T-SQLCLR / System.DirectoryServices NamespaceCustom Code in the RDL / System.DirectoryServices NamespaceQuery AD Directly as a Data source From within the RDL / T-SQL

Page 9: Querying Active Directory From  SSRS

What is LDAP?Lightweight Directory Access Protocol

“is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network.” -- Wikipedia

Used to query or filter Active Directory from T-SQL or .Net code.Neither AD or LDAP are RDBMSAD is Optimized for fast reads

Page 10: Querying Active Directory From  SSRS

Active Directory ExplorerDefinitions:dn = Distinguished Namedc = domain componentou = organizational unitcn = common namesn = surname (last name)givenName = (First Name)

Page 11: Querying Active Directory From  SSRS

Linked Servers

Page 12: Querying Active Directory From  SSRS

OpenQuery

Page 13: Querying Active Directory From  SSRS

Creating the report

Page 14: Querying Active Directory From  SSRS

Creating the AD data source

Page 15: Querying Active Directory From  SSRS

Creating the dataset

Page 16: Querying Active Directory From  SSRS

Creating the Query Expression

Page 17: Querying Active Directory From  SSRS

Preview

Page 18: Querying Active Directory From  SSRS

Solving the Use Case

Page 19: Querying Active Directory From  SSRS

Queries?

Page 20: Querying Active Directory From  SSRS

Additional LDAP Queries