BookmarkSubscribeRSS Feed
CameronLawson
Obsidian | Level 7
Hi All,
I want to set up a program (as a stored process) that will allow people in my company to be registered as a user via a web form. On the public kiosk of our portal I have a url portlet pointing to a home page. I have a form on this page where a user requests access and then an admin adds the user and the user to groups and channels. I want to automate this part by following the below process.

1. User goes to our portal
2. User requests access adding;
a. Network Username
b. Full Name
c. Role
d. Department
e. Manager
f. Contact Number
g. Email
h. Groups they want access to (currently drawn from our metadata server)

3. User is added with the following details created;
a. User Full Name
b. Department added to the Description Field
c. Username added to logins with authentication domain as 'Default Auth'
d. Email & Phone added
e. Role,Department,Manager added as custom attributes
f. User assigned to the group 'Environ Users'

4. Email sent to both user and Admin notifying them they have been added.


What I am looking for is a code snippet that shows me how I can programatically;
a. Add a user to our metadata server
b. Assign a login with DefaultAuth
c. Add a description
d. Add phone and email
e. Add custom attributes.
f. Assign user to a group

Any help is appreciated

Regards,
Cameron
2 REPLIES 2
DanielSantos
Barite | Level 11
Everything you pointed is possible through the Open Metadata Interface, of course with the right authorization level.

Not an easy task though.

You'll have to code your needs into the correct XML request.

Check the online publishing, everything is in there (at least the important facts):

SAS 9.1.3 Open Metadata Interface User's Guide:
http://support.sas.com/documentation/onlinedoc/91pdf/sasdoc_913/omd_interug_9964.pdf

Cheers from Portugal.

Daniel Santos @ www.cgd.pt
deleted_user
Not applicable
It does involve some legwork, but it's far from impossible. Please back everythng up, and be 100% sure it works properly before putting it live though. I take no responsibility for any future problems you may have 😉

Firstly, do you understand the basics of navigating around the underlying metadata? If not read this first http://www2.sas.com/proceedings/forum2008/134-2008.pdf (Sorry to blow my own trumpet)

First you'll need to identify all of the appropriate objects and associations (I'd suggest you start with the 'Person' object, and have a dig around from there. You should get an understanding of all of the new objects you'll need to create and the existing ones you'll need to link to your new user (the authentication domain for example)

Now you just need to set up your XML request. Here's a very crude request, just to highlight the basic principles ............

filename inXML temp ;
data _null_ ;
file inXML lrecl=2500 ;
put
"" /
" " /
" " / /* Create a new job, with a new id (note the $ tells us to create a new id */
" " /
" " / /* Put the new job under an existing tree */
"
" /
"
" /
" " /
" " / /* Create a new transformation Activity */
" " /
" " / /* Assosciate this TA with the 'new' job defined above */
"
" /
"
" /
" " /
"
" /
" &reposid" /
" SAS" /
" 268435456" /
"
" /
;
run ;

proc metadata in = inXML ;
run ;


Hope this all makes sense for you

Cheers

Paul

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1744 views
  • 0 likes
  • 3 in conversation