azure 通过SSO for RStudio连接到Snowflake

idfiyjo8  于 2023-02-09  发布在  其他
关注(0)|答案(1)|浏览(138)

我当前正在尝试通过Azure AD SSO连接到Snowflake。我希望弹出浏览器窗口,以便我可以输入凭据以登录Snowflake。这是我当前使用的代码:

connection <- DBI::dbConnect(
  drv = odbc::odbc(),
  dsn = "snowflake",
  server = "XXXXXXXXXXX.snowflakecomputing.com",
  Trusted_Connection = "True",
  authenticator = "externalbrowser"
)

确实会弹出一个浏览器窗口,但只有以下消息:

Your identity was confirmed and propagated to Snowflake ODBC driver. You can close this window now and go back where you started from.

在我的R控制台上,它是这样说的:

Error: nanodbc/nanodbc.cpp:1021: 28000: The user you were trying to authenticate as differs from the user currently logged in at the IDP.

我哪里出错了,我该怎么做?:(

gg0vcinb

gg0vcinb1#

ODBC要求的连接参数包括连接的用户id。正如@Sergiu建议的那样,将用户信息添加到连接参数中。用户可以是您自己,也可以是您在RStudio中使用的任何服务帐户。

相关问题