<?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 Re: Find AuthDomain of EG-User in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401631#M10591</link>
    <description>I thought about that but I was wondering if there was a more elegant solution.</description>
    <pubDate>Fri, 06 Oct 2017 06:55:13 GMT</pubDate>
    <dc:creator>Criptic</dc:creator>
    <dc:date>2017-10-06T06:55:13Z</dc:date>
    <item>
      <title>Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401284#M10571</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to know if it is possible to get the AuthDomain of a EG-User.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;E.g. I sign into EG7.1 with a profile which has a username and password and an authentication domain. Is it somehow possible to read that domain from a programm (with %put %sysget() for example)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm on SAS9.4M2 and the EG version is 7.1 on Windows. Any help would much appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="profile.PNG" style="width: 550px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15632iED0F0746016CF5E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="profile.PNG" alt="profile.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 11:27:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401284#M10571</guid>
      <dc:creator>Criptic</dc:creator>
      <dc:date>2017-10-05T11:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401309#M10573</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/50279"&gt;@Criptic&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might not fully answer your needs but hopefully it will assist you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EG has some macro-variables you can use.&lt;/P&gt;
&lt;P&gt;To display them all, you can simply run:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;%put _all_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One of the macro-variable is&amp;nbsp;SYSUSERID.&lt;/P&gt;
&lt;P&gt;%put &amp;amp;SYSUSERID; returns the user ID (sasdemo in that case):&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 26 %put &amp;amp;SYSUSERID;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sasdemo&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With that code (you can take of the options statement if you are already connected to the Metadata Server), you'll have the authentication domains linked to the user. If you have more than one, that's the caveat, you'll have few listed...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options metaserver="your server"
        metaport=8561
        metauser="sasadm@saspw"
        metapass="your password"
        metarepository="Foundation"
        metaprotocol=BRIDGE;

%put &amp;amp;SYSUSERID;
%let person=&amp;amp;SYSUSERID;

data logins;
length userid $32 person uri authuri obj authdomain $256 id $17;
    Userid="";
	person="";
keep userid  person uri id obj authdomain; 
obj="omsobj:Person?@Name='"||"&amp;amp;person"||"'";
arc=metadata_getattr(obj,"ID",id);
arc=metadata_getattr(obj,"Name",person);
rc=1;
    n=1;
association=''; 
put arc= id= obj=;
if (arc=-3) then put "No Persons match (&amp;amp;person).";

else do;
        rc=metadata_getnasn(obj,"Logins",
                            n,
                            uri);

 if (rc &amp;gt; 0) then do i=1 to rc;
   

        /* Walk through all possible associations of this object. */

        arc=metadata_getnasn(obj,"Logins",
                            i,
                            uri);
							put rc=;
				 arc = metadata_getattr(uri, "UserID", Userid);
				 
		       arc2=metadata_getnasn(uri,"Domain",
                            1,
                            authuri);
			*put arc2= authuri=;
         arc2= metadata_getattr(authuri, "Name", authdomain);
         put 'Userid=' UserID $32.;
		 put authdomain=;
        output;
        put uri=;
            end;
	Else put "There are no logins for &amp;amp;person";
	end;
run;

proc print data=logins;
  var person userid authdomain;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope that helps.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Damo&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 12:50:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401309#M10573</guid>
      <dc:creator>Damo</dc:creator>
      <dc:date>2017-10-05T12:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401318#M10575</link>
      <description>&lt;P&gt;Thank you for your answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I looked at %put _ALL_ but the AuthDomain can not be found this way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sadly accessing the metadata of user is not an option for me for what I'm trying to do. Maybe I should explain that a little better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to give users a different autoexec depending on some value in their profile. The only two values that I can change are AuthDomain and Description (so if I can access either I'm fine). You might say why not use two different users - my answer to that is that I only have one accepted way to authenticate my users (@saspw user&amp;nbsp;are not okay with our security rules). Next you might say why not use a different level all together - well because only one lib changes and the rest of the libs stay the same.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If anybody as any other ideas of how to achieve this - I'm open to suggestions&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 13:05:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401318#M10575</guid>
      <dc:creator>Criptic</dc:creator>
      <dc:date>2017-10-05T13:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401327#M10576</link>
      <description>&lt;P&gt;If I understand correctly what you are looking for, &lt;EM&gt;viz&lt;/EM&gt; trying to select an autoexec conditionnaly based upon some user's attribute in metadata, I think it won't work that way. Auhentication domains are no placeholders for tagging users, they're technical artifacts for streamlining authentication processes (for instance : users authenticating with their AD account/pwd, generic DBMS accounts like Oracle authenticating against some LDAP directory etc.). Description field can be reused, but as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13934"&gt;@Damo&lt;/a&gt;&amp;nbsp;has shown, it requires (costly) custom requests in metadata because this information is not presented by default when a SAS session is launched.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you try to follow the standard SAS 9 &amp;nbsp;guidelines, you might have to create new objects instead,namely&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) a second Workspace Server references in Metadata (Plug-in Server Manager)&lt;/P&gt;
&lt;P&gt;2) the corresponding Configuration directory, which comes with some customisable Autoexecs&lt;/P&gt;
&lt;P&gt;3) a second metadata Group&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRIKE&gt;3&lt;/STRIKE&gt;&amp;nbsp;&lt;STRONG&gt;4&lt;/STRONG&gt;) &amp;nbsp;some ACTs to redirect users &amp;nbsp;groups to the first Wk Server or to the 2nd based on their MD group&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to spare some extra directories, 2) is not even required sometimes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With this, the user launches the autoexec conditionnaly without having to devise some custom MD request &amp;amp; custom parameter storage within a user's MD references : this is automatically handled by metadata standard security rules.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 14:03:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401327#M10576</guid>
      <dc:creator>ronan</dc:creator>
      <dc:date>2017-10-05T14:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401333#M10577</link>
      <description>&lt;P&gt;How many users are we talking about, and how often do they change from one group to another?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 13:46:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401333#M10577</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-05T13:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401606#M10586</link>
      <description>About a dozen users. This extra lib contains sensitive information which the users are not to use in their daily work so we want to exclude it from their "normal" Profile for auditing reasons</description>
      <pubDate>Fri, 06 Oct 2017 04:34:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401606#M10586</guid>
      <dc:creator>Criptic</dc:creator>
      <dc:date>2017-10-06T04:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401607#M10587</link>
      <description>&lt;P&gt;Thank you for your answer, but this doesn't quite get to the core of my problem if I understand you correctly. What I got from your explanation is that you "assign" a user a autoexec based on his medata groups - we are already doing this - in fact every single user has their own specific autoexec which gets generated on metadata changes.&lt;/P&gt;
&lt;P&gt;I'm trying to further elaborate on my problem:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I want to have a user lets call him Mr Pink. Mr. Pink has 5 Metadata Groups, as login authentication he uses his Windows Profile (Windows AD). Now we want to give him the ability to access another lib which contains sensitive information. He is not supposed to see this Lib in his everyday work but he should have the ability to access this Lib when needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the idea is to give him two autoexec one where he has access to things his 5 MD-Groups allow him and another one where he his allowed to use additonally use this special Lib. Limitation is that the only allowed way to authenticate a user is to use the Windows AD.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 04:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401607#M10587</guid>
      <dc:creator>Criptic</dc:creator>
      <dc:date>2017-10-06T04:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401626#M10588</link>
      <description>&lt;P&gt;Define "when needed"? Who determines that, and when, and what are the criteria?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 06:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401626#M10588</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-06T06:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401629#M10589</link>
      <description>The user does this at his own discretion. I know this sounds bananas but I'm not the one who decides on these measures.</description>
      <pubDate>Fri, 06 Oct 2017 06:50:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401629#M10589</guid>
      <dc:creator>Criptic</dc:creator>
      <dc:date>2017-10-06T06:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401630#M10590</link>
      <description>&lt;P&gt;Then the user just has to run a single libname statement. Problem solved. If necessary, provide them with a centralized include, so you can change the physical pathname from a single file.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 06:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401630#M10590</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-06T06:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401631#M10591</link>
      <description>I thought about that but I was wondering if there was a more elegant solution.</description>
      <pubDate>Fri, 06 Oct 2017 06:55:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401631#M10591</guid>
      <dc:creator>Criptic</dc:creator>
      <dc:date>2017-10-06T06:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401634#M10592</link>
      <description>&lt;P&gt;If this could be packed into a standard project (that is loaded automatically when EG starts), you can define an autoexec process flow in that project, containing the libname code and execute the libname depending on a user prompt.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 07:13:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401634#M10592</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-06T07:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401635#M10593</link>
      <description>Thank you this is a great idea. But I think the perfect elegant solution I'm looking for doesn't exist. So I'm probably going with the lib statement as that seems to be the least intrusive for the users and our system</description>
      <pubDate>Fri, 06 Oct 2017 07:16:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401635#M10593</guid>
      <dc:creator>Criptic</dc:creator>
      <dc:date>2017-10-06T07:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401640#M10594</link>
      <description>&lt;P&gt;An elegant solution always includes some kind of automation. "The whim of a user" is hard to automate.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 07:51:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401640#M10594</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-06T07:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Find AuthDomain of EG-User</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401696#M10597</link>
      <description>&lt;P&gt;Ok, I see, thanks for clarifying. You are trying to declare some hidden libraries based on Windows shared folders for specific users. As &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;mentioned, its quite difficult to declare something *and* to keep it undeclared : you have to choose either way, not both in our coarse euclidean universe ! (at smaller scale, someone has told some time ago, things might different &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For this kind of purpose, you can of course let the user assign manually the library in her/his session as shown above.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also use &lt;STRONG&gt;indirect libraries assignments&lt;/STRONG&gt; based on System environment variable, here Windows folder paths (I assume) :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A title="Using Environment Variables" href="http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.2&amp;amp;docsetId=hostwin&amp;amp;docsetTarget=n07buc7sg08fdrn1c1jmmr8hl78r.htm&amp;amp;locale=en" target="_self"&gt;http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.2&amp;amp;docsetId=hostwin&amp;amp;docsetTarget=n07buc7sg08fdrn1c1jmmr8hl78r.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming you declare at the OS session level some "LSENS" (name it as you like following SAS libname namings rules) environment variable like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LSENS=Z:\SENSITIVE_DIRECTORY_PATH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then, in the SAS session, your SAS user can access any SAS tables stored in this directory &lt;STRONG&gt;without any prior explicit libname assignment&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running a sas code like this one will automatically assign LSENS libref the first time it is encountered :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data LSENS.mytable;
set source_table;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Oct 2017 10:54:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Find-AuthDomain-of-EG-User/m-p/401696#M10597</guid>
      <dc:creator>ronan</dc:creator>
      <dc:date>2017-10-06T10:54:19Z</dc:date>
    </item>
  </channel>
</rss>

