<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Configuring OAuth2 for SAS Viya to Snowflake Connection via Azure AD in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Configuring-OAuth2-for-SAS-Viya-to-Snowflake-Connection-via/m-p/985060#M30751</link>
    <description>&lt;P data-path-to-node="5"&gt;Hello,&lt;/P&gt;
&lt;P data-path-to-node="5"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="6"&gt;We are in the early stages of migrating from SAS 9.4 to SAS Viya on GCP, using Azure AD as our Identity Provider. To enable Snowflake authentication for individual users via OAuth2, we have configured two apps in Azure Enta:&lt;/P&gt;
&lt;P data-path-to-node="6"&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="1" data-path-to-node="7"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7,0,0"&gt;&lt;STRONG data-index-in-node="0" data-path-to-node="7,0,0"&gt;Snowflake Resource App&lt;/STRONG&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7,1,0"&gt;&lt;STRONG data-index-in-node="0" data-path-to-node="7,1,0"&gt;SAS Viya Client App&lt;/STRONG&gt; with the following configuration:&lt;/P&gt;
&lt;UL data-path-to-node="7,1,1"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7,1,1,0,0"&gt;Client ID and Secret.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7,1,1,1,0"&gt;Redirect URI pointing to our SAS Viya environment.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7,1,1,2,0"&gt;UPN included in the Token configuration.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7,1,1,3,0"&gt;API permissions for the Snowflake Resource app, including offline access to enable refresh tokens.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-path-to-node="8"&gt;&lt;STRONG data-index-in-node="0" data-path-to-node="8"&gt;Our Current Understanding:&lt;/STRONG&gt; When a user executes a Snowflake libname statement, they will be prompted with a URL to authenticate. Upon successful login, an access token is issued, the user is redirected back to SAS Viya, and the connection to Snowflake is established.&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;I plan to use the &lt;STRONG data-index-in-node="18" data-path-to-node="9"&gt;SAS Viya Credentials Service&lt;/STRONG&gt; to create an OAuth 2.0 domain (e.g., snowflake_custom_app ) containing the Client ID, Secret, and Scope, then reference it in the libanme statement:&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;libname snw_user snow dsn="snowflake" authdomain="snowflake_custom_app";&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;&lt;CODE data-index-in-node="0" data-path-to-node="10"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P data-path-to-node="11"&gt;&lt;STRONG data-index-in-node="0" data-path-to-node="11"&gt;I have two specific questions on this:&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL start="1" data-path-to-node="12"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="12,0,0"&gt;&lt;STRONG data-index-in-node="0" data-path-to-node="12,0,0"&gt;Redirect URI:&lt;/STRONG&gt; Is the standard SAS Logon callback the correct URI to use for this specific Azure client setup?&lt;/P&gt;
&lt;UL data-path-to-node="12,0,1"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="12,0,1,0,0"&gt;&lt;I data-index-in-node="0" data-path-to-node="12,0,1,0,0"&gt;Example:&lt;/I&gt; &lt;CODE data-index-in-node="9" data-path-to-node="12,0,1,0,0"&gt;&lt;A href="https://your-viya-server.com/SASLogon/oauth2/callback" target="_blank"&gt;https://your-viya-server.com/SASLogon/oauth2/callback&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="12,1,0"&gt;&lt;STRONG data-index-in-node="0" data-path-to-node="12,1,0"&gt;Refresh Tokens:&lt;/STRONG&gt; We want to ensure users don't have to re-authenticate for every connection within a single session. How is the refresh token handled in Viya? Will the snowflake_custom_app domain automatically manage the refresh token after the initial login? Additionally, should the redirect URI be specific to the domain name as shown below?&lt;/P&gt;
&lt;UL data-path-to-node="12,1,1"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="12,1,1,0,0"&gt;&lt;I data-index-in-node="0" data-path-to-node="12,1,1,0,0"&gt;Example:&lt;/I&gt; &lt;CODE data-index-in-node="9" data-path-to-node="12,1,1,0,0"&gt;&lt;A href="https://your-viya-server.com/SASLogon/oauth2/code/snowflake_custom_app" target="_blank"&gt;https://your-viya-server.com/SASLogon/oauth2/code/snowflake_custom_app&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-path-to-node="13"&gt;I appreciate any insights or best practices you can share! Thank you for your help.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Mar 2026 17:53:56 GMT</pubDate>
    <dc:creator>freshstarter</dc:creator>
    <dc:date>2026-03-20T17:53:56Z</dc:date>
    <item>
      <title>Configuring OAuth2 for SAS Viya to Snowflake Connection via Azure AD</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Configuring-OAuth2-for-SAS-Viya-to-Snowflake-Connection-via/m-p/985060#M30751</link>
      <description>&lt;P data-path-to-node="5"&gt;Hello,&lt;/P&gt;
&lt;P data-path-to-node="5"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="6"&gt;We are in the early stages of migrating from SAS 9.4 to SAS Viya on GCP, using Azure AD as our Identity Provider. To enable Snowflake authentication for individual users via OAuth2, we have configured two apps in Azure Enta:&lt;/P&gt;
&lt;P data-path-to-node="6"&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="1" data-path-to-node="7"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7,0,0"&gt;&lt;STRONG data-index-in-node="0" data-path-to-node="7,0,0"&gt;Snowflake Resource App&lt;/STRONG&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7,1,0"&gt;&lt;STRONG data-index-in-node="0" data-path-to-node="7,1,0"&gt;SAS Viya Client App&lt;/STRONG&gt; with the following configuration:&lt;/P&gt;
&lt;UL data-path-to-node="7,1,1"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7,1,1,0,0"&gt;Client ID and Secret.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7,1,1,1,0"&gt;Redirect URI pointing to our SAS Viya environment.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7,1,1,2,0"&gt;UPN included in the Token configuration.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7,1,1,3,0"&gt;API permissions for the Snowflake Resource app, including offline access to enable refresh tokens.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-path-to-node="8"&gt;&lt;STRONG data-index-in-node="0" data-path-to-node="8"&gt;Our Current Understanding:&lt;/STRONG&gt; When a user executes a Snowflake libname statement, they will be prompted with a URL to authenticate. Upon successful login, an access token is issued, the user is redirected back to SAS Viya, and the connection to Snowflake is established.&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;I plan to use the &lt;STRONG data-index-in-node="18" data-path-to-node="9"&gt;SAS Viya Credentials Service&lt;/STRONG&gt; to create an OAuth 2.0 domain (e.g., snowflake_custom_app ) containing the Client ID, Secret, and Scope, then reference it in the libanme statement:&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;libname snw_user snow dsn="snowflake" authdomain="snowflake_custom_app";&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;&lt;CODE data-index-in-node="0" data-path-to-node="10"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P data-path-to-node="11"&gt;&lt;STRONG data-index-in-node="0" data-path-to-node="11"&gt;I have two specific questions on this:&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL start="1" data-path-to-node="12"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="12,0,0"&gt;&lt;STRONG data-index-in-node="0" data-path-to-node="12,0,0"&gt;Redirect URI:&lt;/STRONG&gt; Is the standard SAS Logon callback the correct URI to use for this specific Azure client setup?&lt;/P&gt;
&lt;UL data-path-to-node="12,0,1"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="12,0,1,0,0"&gt;&lt;I data-index-in-node="0" data-path-to-node="12,0,1,0,0"&gt;Example:&lt;/I&gt; &lt;CODE data-index-in-node="9" data-path-to-node="12,0,1,0,0"&gt;&lt;A href="https://your-viya-server.com/SASLogon/oauth2/callback" target="_blank"&gt;https://your-viya-server.com/SASLogon/oauth2/callback&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="12,1,0"&gt;&lt;STRONG data-index-in-node="0" data-path-to-node="12,1,0"&gt;Refresh Tokens:&lt;/STRONG&gt; We want to ensure users don't have to re-authenticate for every connection within a single session. How is the refresh token handled in Viya? Will the snowflake_custom_app domain automatically manage the refresh token after the initial login? Additionally, should the redirect URI be specific to the domain name as shown below?&lt;/P&gt;
&lt;UL data-path-to-node="12,1,1"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="12,1,1,0,0"&gt;&lt;I data-index-in-node="0" data-path-to-node="12,1,1,0,0"&gt;Example:&lt;/I&gt; &lt;CODE data-index-in-node="9" data-path-to-node="12,1,1,0,0"&gt;&lt;A href="https://your-viya-server.com/SASLogon/oauth2/code/snowflake_custom_app" target="_blank"&gt;https://your-viya-server.com/SASLogon/oauth2/code/snowflake_custom_app&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-path-to-node="13"&gt;I appreciate any insights or best practices you can share! Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2026 17:53:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Configuring-OAuth2-for-SAS-Viya-to-Snowflake-Connection-via/m-p/985060#M30751</guid>
      <dc:creator>freshstarter</dc:creator>
      <dc:date>2026-03-20T17:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring OAuth2 for SAS Viya to Snowflake Connection via Azure AD</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Configuring-OAuth2-for-SAS-Viya-to-Snowflake-Connection-via/m-p/985441#M30758</link>
      <description>When you configure Viya for OIDC authentication you can set "credentials.enabled" to "true" in the OIDC configuration. This will instruct SAS Logon Manager to store the token supplied for initial authentication to the credentials service under a domain named for the configuration (e.g. azure_oidc).&lt;BR /&gt;&lt;BR /&gt;When you submit a libname statement with the AUTHSCOPE setting, this will trigger a call back to the OIDC provider for an access token for the requested scope using the initially captured access token. This is enabled by the API permissions in the SAS Viya Client App to the Snowflake Resource App. &lt;BR /&gt;&lt;BR /&gt;So the user would not be redirected anywhere, this would all be handled by Viya, and this is how the tokens remain valid.&lt;BR /&gt;&lt;BR /&gt;The redirect URI you have is correct for the OIDC configuration.</description>
      <pubDate>Thu, 26 Mar 2026 14:50:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Configuring-OAuth2-for-SAS-Viya-to-Snowflake-Connection-via/m-p/985441#M30758</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2026-03-26T14:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring OAuth2 for SAS Viya to Snowflake Connection via Azure AD</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Configuring-OAuth2-for-SAS-Viya-to-Snowflake-Connection-via/m-p/986154#M30776</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/78975"&gt;@gwootton&lt;/a&gt;&amp;nbsp; for your response. After setting&amp;nbsp;&lt;SPAN&gt;"credentials.enabled" , we are successfully able to connect to Snowflake.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2026 14:55:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Configuring-OAuth2-for-SAS-Viya-to-Snowflake-Connection-via/m-p/986154#M30776</guid>
      <dc:creator>freshstarter</dc:creator>
      <dc:date>2026-04-09T14:55:03Z</dc:date>
    </item>
  </channel>
</rss>

