Querying Active Directory From SSRS

Slides:



Advertisements
Similar presentations
Module 1: Introduction to SQL Server Reporting Services.
Advertisements

INTRODUCTION TO BUILDING REPORTS Reporting Services.
Presented by: Wes Springob Business Intelligence Developer, Agile Bay, Inc.
Evan Ross Principal Automating Security in IBM Cognos 8 Transformer.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 1: Introduction to Windows Server 2003.
27. to 28. March 2007 | Geneva, Switzerland. Fabrice Romelard ilem SA Level 200.
Hands-On Microsoft Windows Server 2003 Administration Chapter 1 Windows Server 2003 Network Administration.
SQL Reporting Services Overview SSRS includes all the development and management pieces necessary to publish end user reports in  HTML  PDF 
By Karan Oberoi.  A directory service (DS) is a software application- or a set of applications - that stores and organizes information about a computer.
Understanding Active Directory
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 1: Introduction to Windows Server 2003.
1 CSIT 320. Just as the combination of a database and a database management system collects and organizes information about an institution/company/… as.
BZUPAGES.COM An Introduction to. BZUPAGES.COM Introduction Large corporations today face the following problems Finding a certain file. Seeing everything.
Directory services Unit objectives
Module D Panko and Panko Business Data Networks and Security, 9 th Edition © 2013 Pearson Education, Inc. Publishing as Prentice Hall.
GRID Centralized management of the Globus grid-mapfile Carlo Rocca INFN, Catania.
Introduction To OpenLDAP Directory Services. What is a Directory Service? A specialized database optimized for reading, browsing, and searching. No complicated.
LIGHT WEIGHT DIRECTORY ACCESS PROTOCOL Presented by Chaithra H.T.
Windows 2000 Operating System -- Active Directory Service COSC 516 Yuan YAO 08/29/2000.
1© Copyright 2013 EMC Corporation. All rights reserved. Dimitri Ayrapetov November 9, 2013 Introduction to Building Reports Reporting Services.
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
SERVER I SLIDE: 6. SERVER I Topics: Objective 4.3: Deploy and configure the DNS service Objective 5.1: Install domain controllers.
Active Directory Windows2003 Server. Agenda What is Active Directory What is Active Directory Building an Active Directory Building an Active Directory.
Active Directory. Computers in organizations Computers are linked together for communication and sharing of resources There is always a need to administer.
The DSpace Course Module – Configuring LDAP. Module objectives  By the end of this module you will:  Understand how DSpace uses LDAP for authentication.
Active Directory Maryam Izadi. Topics Covered NT Vs 2000/2003 Active Directory LDAP MMC.
Navigating SQL Server Lesson 3. Skills Matrix Graphical User Interface (GUI) Management Tools SQL Server Management Studio SQL Server Configuration Manager.
LDAP Authentication Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
LDAP (Lightweight Directory Access Protocol ) Speaker: Chang-Yu Wu Adviser: Quincy Wu Date:2007/08/22.
Page 1 Active Directory and DNS Lecture 2 Hassan Shuja 09/14/2004.
Chapter 4- Part3. 2 Implementing User Profiles A local user profile is automatically created at the local computer when you log on with an account for.
LDAP (Lightweight Directory Access Protocol)
OVERVIEW OF ACTIVE DIRECTORY
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Course Overview Introduction Target Audiences Course Structure Virtual PC Demo.
Introduction to Active Directory
Configuring, Managing and Maintaining Windows Server® 2008 Servers Course 6419A.
Module 1: Introduction to Active Directory
Hussain Ali Department of Computer Engineering KFUPM, Dhahran, Saudi Arabia Active Directory.
LDAP Namespace CNS 4650 Fall 2004 Rev. 2. What is a namespace? Different from XML, C++, Java, etc. Names permitted and used in a directory Can include.
Active Directory. Computers in organizations Computers are linked together for communication and sharing of resources There is always a need to administer.
CEG 2400 Fall 2012 Directory Services Active Directory Tree Domain.
1 Introduction to Active Directory Directory Services Uniquely identify users and resources on a network Provide a single point of network management.
MCSE: Windows Server 2003 Active Directory Planning, Implementation, and Maintenance Study Guide, Second Edition (70-294) Chapter 1: Overview of the Active.
Build your first Dashboard in Power BI Pro in 60 Minutes.
Introduction to SQL Server  Working with MS SQL Server and SQL Server Management Studio.
Active Directory Domain Services (AD DS). Identity and Access (IDA) – An IDA infrastructure should: Store information about users, groups, computers and.
© 2013 IBM Corporation LDAP Fundamentals & LDAP for CLM Bruce Besch IBM Rational Services.
Presented by Zap Riecken Using SQL Server to Query Active Directory Wednesday March 18, 2015 Olympia, WA.
SQL Server Reporting Service & Power BI
Introduction to LDAP Frank A. Kuse.
Overview of Active Directory Domain Services
Solving the Hard Problems
(ITI310) SESSIONS 6-7-8: Active Directory.
CONFIGURING LDAP Authentication (rsso 9.1)
Objectives Differentiate between the different editions of Windows Server 2003 Explain Windows Server 2003 network models and server roles Identify concepts.
Implementing TMG Server Publishing
Active Directory Stored collection of information about objects
SQL Server 2000: Integration with AD and E2K
Querying Active Directory From SSRS
CEG 2400 Fall 2012 Directory Services - LDAP
Introduction to Name and Directory Services
DAT381 Team Development with SQL Server 2005
AD FS Installation Active Directory Federation Services (AD FS) 7.1
Windows Active Directory Environment
Active Directory Organizational Units
Microsoft Active Directory
ACTIVE DIRECTORY An Overview.. By Karan Oberoi.
Introduction to Active Directory Directory Services
SQL Server 2005 Reporting Services
Developing with uConnect
Presentation transcript:

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 http://twitter.com/SQLWes http://LinkedIn.com/in/SQLWes Wes Springob, (No Relation To Mr. Squarepants) BI Consultant @NYL Originally from Pittsburgh, now New Port Richey Wife Ashley, Portrait Photographer Background Do you know why speakers poll their audiences at the beginning of a presentation? Stated purpose is to tailor the discussion to the audience level. Truth is to determine exactly how much we can BS our way through it. So who knows what? LDAP, SSRS, T-SQL, Linked Servers?

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

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: SSRS determines if you can run, subscribe to or edit a report. It does a great job and we don’t want to alter or circumvent that security in any way.

We can do more Find out additional information about a user for use within the report Securely extend additional data based on the user ID of the logged in user’s security group memberships. User Story

System of record Many 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.

Tools A SQL Server with SSRS installed Management Studio Visual Studio, BIDS or Report Builder to create RDL’s Active Directory Explorer Aids in writing LDAP queries Free tool, downloadable from Technet Any domain account typically has sufficient, Read Only, rights to query AD

Approaches Linked Servers / T-SQL CLR / System.DirectoryServices Namespace Custom Code in the RDL / System.DirectoryServices Namespace Query AD Directly as a Data source From within the RDL / T-SQL Linked Server Most flexible, easiest solution for T-SQL developer Easily configured & maintained Through procs, functions & views you can quickly create a relational representation of you AD hierarchy CLR Difficult to set up, code and maintain Extends the greatest flexibility Must be registered on the SQL Server, strongly named… .Net code, feels more like filtering Custom Code in RDL Requires SSRS Server configuration to allow the System.DirectoryServices Namespace to be accessed, and a reference to be created within the RDL Similar to CLR in complexity and utility Query AD Directly as a Data Source from within an RDL Easily configured data source. No support from the development environment’s SQL parser. (if you write perfectly, it works. If not, good luck debugging in VS/BIDS/Report Builder) Better off editing with a linked server in MS and copying the query to your RDL The method I believe has the most utility to be used in the most environments, is to query directly from the RDL and will server as our example in a couple min.

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 RDBMS AD is Optimized for fast reads AD is Optimized for fast reads, because it is queried at run time and only returns a limited number of results, typically.

Active Directory Explorer Definitions: dn = Distinguished Name dc = domain component ou = organizational unit cn = common name sn = surname (last name) givenName = (First Name)

Linked Servers From Management Studio, you will need to use the OLE DB Provider for Microsoft Directory Services Use the ADsDSOObject Provider string Ad the Data source, which is your AD server

OpenQuery From Management Studio, write a test query of Active Directory using OPENQUERY and the information we gathered in AD Explorer Error messages aren’t great, but far better than VS parser. All quotes are single quotes We could stop right here Create a series of Stored procedures, views and functions to create a relational set of data representing our Active Directory entries and use it in any system that can access this SQL server OR, your company might not like you to use linked servers In which case you will probably only be able to use linked servers for development purposes.

Creating the report

Creating the AD data source Using an existing report project, add a new shared datasource to your AD server Give it a meaningful name because it likely won’t be the only data source for your report Use the OLE DB option for your connection type The connection string is just that simple, provider = ADsDSOObject and Data Source = your AD server name

Creating the dataset Using the Data Source you just created, create an embedded dataset using the text query type. You will need to use the expression builder because the Parser does not interpret LDAP queries This means query designer is disabled You won’t be able to use parameters You will need to fill in your fields manually You need to be accurate in your typing, including case.

Creating the Query Expression Translate your OPENQUERY to the Query Expression dialog Don’t confuse single & double quotes Work in the Built-in Field “UserID”, stripping out your domain from the string

Preview Use the results of the embedded dataset within the body of the report to complete your “Hello, Wes!” example. Often, for development purposes, you will need to create a Parameter to simulate the value from the Built in Value from User!UserID (to simulate other users)

Solving the Use Case

Queries?

Additional LDAP Queries

Resources: Active Directory Explorer Download: http://technet.microsoft.com/en-us/sysinternals/bb963907.aspx This Slide Deck: http://SQLWes.com