Connecting R to Snowflake via ODBC with SSO and Web Authentication - r

I'm trying to connect R Studio to Snowflake via ODBC but we're on SSO and web authentication. A lot of the articles I've found are based on a user having a user ID and password authentication access.
I'm using the odbc, DBI, dplyr and dbplyr packages
Thanks

Related

Specifying windows account for SSIS SourceConnectionOLEDB

I'm starting an SSIS package from an .aspx using sp_start_job on the SQL-server.
This package is an import-job, where the destination database is on the same server as the job, so the DestinationConnectionOLEDB uses the same SQL-credentials as for running the job.
However, the source is on another server, and the SourceConnectionOLEDB requires a windows domain account for logon. (The package runs fine from Visual Studio, using my windows account).
I seem to have two possible solutions for the account in the SourceConnectionOLEDB.
either to pass the account of the user who is running the .aspx
or specify a fixed windows account and password in the package.
The last seems not possible to do in Visual Studio, as soon as I select Windows Authentication, the UserID and password field is disabled. Or is there a way of saving this info in the SSIS?
And if not, how do I pass the users windows credentials to the sp_start_job?
If I got it right, you have a SQL Server Agent job that runs an SSIS package, with a step of type "SQL Server Integration Services Package".
You cannot save AD user login info in SSIS (afaik), but you can specify which user runs the job step in SQL Server by setting up credentials and proxy to be used in that specific job step.
When you run the job, it gets executed as the SQL Server Agent Account by default, but you can change that by using credentials and proxy.
The credentials (Security - Credentials) allows you to specify a username and pw (even an AD user), to be used later by a proxy
The proxy (SQL Server Agent - Proxies) allows you to specify which credentials are available to different job step types.
Summary:
Create the credentials object (Security - Credentials) for your AD user
Create the proxy object (SQL Server Agent - Proxies)
use the credentials defined in point 1
enable the subsystem "SQL Server Integration Services Package"
Configure the job step
in the "run as" dropdown you should see the proxy you just created
Of course in your package you must have set Windows authentication for the data source

Is it possible to authenticate against a Sql Db in ADFS 2019?

Is it possible to configure the ADFS to use a SQL DB(any database that supports SQL query language) for users instead of the default ActiveDirectory?
(ADFS 2019)
Not natively. The way to do it as of today (25/02/2020) is to use a product that does LDAP like a proxy for the SQL database. See https://optimalidm.com/products/virtual-identity-server/.
Then use that LDAP directory like so https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/operations/configure-ad-fs-to-authenticate-users-stored-in-ldap-directories

After upsizing ms access database for distribution front-end what i have to do

I would like to know after upsizing ms access database to sql server successfully with my user name in the domain and windows authentication and linking access tables to sql server tables,
for distribution this front-end to other users in the domain what i have to do? Is enough give a copy of the front-end to other users and defining their user names and permissions in the sql server? Or it needs some vba code in ms access for defining linked tables and ODBC connection?
Yes, if the ODBC driver you use is installed on users' machines - and, of course, Access is installed.
Table links don't change. If you didn't use Windows authentication, however, tables had to be relinked using each user's credentials.

SSISDB ASP.NET "Login failed for user 'DOMAIN\PCNAME$'"

I am using Microsoft.SqlServer.Management.IntegrationServices in an ASP.NET web form to access an SSIS project in SSISDB. Testing locally on my own PC I am able to access the package from the test server and it runs fine.
My issue comes up when I try to run the site from the test server. The same test server hosts the site with IIS 7 and hosts the Sql Server database which stores the package with Integration Services. So like I said, the package is hosted on the server and when I run the site locally on my PC, all works fine.
When I run the site on test and try to access the package I get:
System.Data.SqlClient.SqlException (0x80131904): Login failed for user '[DOMAIN]\[PCNAME]$'.
I am using integrated security in my connection string:
SqlConnection connection = new SqlConnection(#"Data Source=[Test_Server];Initial Catalog=master;Integrated Security=True;");
IntegrationServices integrationServices = new IntegrationServices(connection);
My error comes up here when trying to connect.
I've tried adding '[DOMAIN]\[PCNAME]$' as a Sql login using Windows authentication with every permission I can think of. User mapping for database SSISDB has accessadmin, datareader, datawriter, owner, public, and ssis admin. I know not all of these should be needed, but I'm trying everything.
I went to SSISDB under databases, and gave the login permission to Connect, Execute, and Select.
Under Integration Services Catalogs I gave my folder, under SSISDB catalog, permission for the my Windows User ('[DOMAIN]\[PCNAME]$') login to Read, Execute Objects, and Read Objects.
I gave the SSISDataTransfer project permission for the Windows User to Read, Modify, and Execute.
I'm out of ideas and figure it's probably some IIS issue. It has Windows Authentication installed and set.
Anyone have any ideas? I've found posts about how to get the code to work, but nothing on connection specifics. Thanks!
i have had similar problem recently and i have worked with SSIS packages being used with web applications too. in my opinion you should use a custom user account to be used as your app pool account. and you will have to add this account to your database server. when running an app pool as local system or network service, the account being used for connection to a remote database server will be "DomainName\MachineName$" which will be different for every machine which tries to connect to your sql server. so instead of adding all these user names in sql, you will be better off using a custom user account.
Secondly looks like your web application does not run on the same machine as your sql server which i think will not work because you can invoke SSIS package from the same server only.
Another thing to try is to add a credential to sql server - in Security - Credentials in SQL Server management studio. This credential would be the authenitcated user that you are running it successfully under. Then in your SSIS package, in SQL Server agent, go into the job step and in the "Run As"drop down, select the new credential for your user that you created.

Prompted for credentials when using a shared data source with Report Builder 2.0 over the Internet with forms authentication

SQL Server 2008 (not R2). I am trying to allow users to build and deploy SSRS reports on a reporting server that the users can only access over the Internet. I have created a custom forms authentication provider.
I can now connect to the reporting server over the Internet via either the report manager or report builder 2.0. What I would like to do is to provide the user with a shared data source which he/she can use in reports. I have created a data source with credentials stored on the server. Now, I can create a report and add the shared data source. However, when I try to add a data set, I get prompted for credentials for the data source. If I have access to the database server over the network, I can put in the credentials and everything works. However, when working over the Internet (the db server is not accessible from outside the firewall) it fails with "Login failed for ".
I think it's trying to connect directly to the database server when I do this rather than connecting through the report server and using the shared data source. If I use a shared model on the server instead of a data source, it works fine, but I'd like the flexibility of using a data source.
Is this possible? If not, does anyone know if it's different in R2/RB3? I don't have access to R2 to test.
Thanks in advance,
Josh

Resources