Store Credentials in a Reporting Services Data Source
Applies to: SQL Server 2016 (13.x) Reporting Services and later SharePoint
Applies to: SQL Server 2016 (13.x) Reporting Services and later
You can configure stored credentials that a Reporting Services report server uses to access external data for a report. Stored credentials are used if the report runs unattended, for example a Reporting Services subscription that publishes a report as an e-mail. The report server retrieves and uses the credentials when report processing is scheduled or triggered. This topic walks you through configuring stored credentials for both Native mode and SharePoint mode report servers.
Security policy requirements for stored credentials
It is required that the account you use for stored credentials, is configured for one of the following security policies on the report server. It is recommended you select the policy with the minimum level of permissions you require for your environment.
Allow log on locally. For more information, see Allow log on locally.
Log on as a batch job. For more information, see Log on as a batch job.
For general information on policies, see Edit security settings on a Group Policy object.
Configure stored credentials for a report-specific data source (Native mode)
In the web portal, browse to the folder that contains the report. Click the ellipsis (...) in the upper-right corner of the report tile.
Click Manage and then click Data Sources.
Select A custom data source.
In the Data Source Type list, select the data processing extension that is used to process data from the data source.
For Connection String, specify the connection string that the report server uses to connect to the data source. The following example illustrates a connection string used to connect to the SQL Server
AdventureWorks2022
database:data source=<servername>;initial catalog=AdventureWorks2022
For Connect Using, select Credentials stored securely in the report server.
Type a user name and password.
If the account is a Windows domain user account, specify it in this format: <domain>\<account>, and then select Use as Windows credentials when connecting to the data source.
If the user name and password are database credentials, do not select Use as Windows credentials when connecting to the data source. If the database server supports impersonation or delegation, you can select Impersonate the authenticated user after a connection has been made to the data source.
Click Apply.
Configure stored credentials for a report-specific data source (SharePoint mode)
Browse to the document library that contains the report and then click the open menu .
Click second open menu and then click Manage Data Sources.
Click the name of the Custom data source you want to configure with stored credentials.
In the Data Source Type list, select the data processing extension that is used to process data from the data source.
For Connection String, specify the connection string that the report server uses to connect to the data source. The following example illustrates a connection string used to connect to the SQL Server
AdventureWorks2022
database:data source=<servername>;initial catalog=AdventureWorks2022
For Credentials, select Stored Credentials.
Type a user name and password.
If the account is a Windows domain user account, specify it in this format: <domain>\<account>, and then select Use as Windows credentials when connecting to the data source.
If the user name and password are database credentials, do not select Use as Windows credentials. If the database server supports impersonation or delegation, you can select Set execution context to this account.
Click ok.
Configure stored credentials for a shared data source (Native mode)
In the web portal, browse to the shared data source item.
Click the ellipsis (...) in the upper-right corner of the report tile > Manage.
In the Type list, specify the data processing extension that is used to process data from the data source.
For Connection String, specify the connection string that the report server uses to connect to the data source. Microsoft recommends that you do not specify credentials in the connection string.
The following example illustrates a connection string used to connect to the local SQL Server
AdventureWorks2022
database:data source=<localservername>; initial catalog=AdventureWorks2022
Type a user name and password.
If the account is a Windows domain user account, specify it in this format: <domain>\<account>, and then select Use as Windows credentials when connecting to the data source.
If the user name and password are database credentials, do not select Use as Windows credentials when connecting to the data source. If the database server supports impersonation or delegation, you can select Impersonate the authenticated user after a connection has been made to the data source.
Click Apply.
Configure stored credentials for a shared data source (SharePoint mode)
In the document library, browse to the shared data source item.
Click the context menu and then click the second context menu .
Click Edit Data Source Definition.
In the Data Source Type list, specify the data processing extension that is used to process data from the data source.
For Connection String, specify the connection string that the report server uses to connect to the data source. Microsoft recommends that you do not specify credentials in the connection string.
The following example illustrates a connection string used to connect to the local SQL Server
AdventureWorks2022
database:data source=<localservername>; initial catalog=AdventureWorks2022
Type a user name and password.
If the account is a Windows domain user account, specify it in this format: <domain>\<account>, and then select Use as Windows credentials.
If the user name and password are database credentials, do not select Use as Windows credentials. If the database server supports impersonation or delegation, you can select Set Execution context to this account.
Click Ok.