Create user in ADAM instance with powershell

Hi
I was wondering if you could help me with the ability to create a user in AD / Adam? I am trying to write the powershell code to create users for Teradata connectivity. the manual process is to use adsiedit and create the users through groupof names class.
This is what I have that is NOT working and was looking where to go from here.
$dom=[ADSI]"LDAP://OU=Users,OU=dev,OU=tdev,dc=acme,dc=com"
$obj = $dom.Create('GroupOfNames', 'CN=ASmith')
$obj.SetInfo()
any help would be greatly appreciated.
Thank you

Hi JRRemillard,
What is the OS version? And have you checked the AD module?
If the version is server 2008 or server 2003, please check this article to download Active Directory Management Gateway Service:
Active Directory Management Gateway Service
You can check the
AD module , and create a new user, please try the cmdlet New-ADUser.
If there is anyting else regarding this issue, please feel free to post back.
If you have any feedback on our support, please click here.
Best Regards,
Anna Wang
TechNet Community Support

Similar Messages

  • How to create user editable Crystal Report with dynamic dataset

    What I would like to achieve:
    A program loads a report in runtime updates list of database fields (possibly includes sample data), open report in "Crystal Reports 2011" (or 2008) where user customizes report and saves it. Later on the program loads the report, fills actualized data and displays it in .net report viewer.
    What I do:
    CrReport = New CrystalDecisions.CrystalReports.Engine.ReportDocument
    CrReport.Load(TemplateFilename)
    Dim Results As DataTable
    DataTable is filled from a database
    CrReport.SetDataSource(mResults)
    CrReport.SaveAs(NewReportPath, True)
    The NewReportPath is opened in the default program.
    What are the problems
    The report is open in preview mode (not in design).
    When the field is added to the report the designer asks for XML datasource on preview.

    The short answer is that it is not possible. I broke the question to other two: How to save a report that it opens without preview? and How to create user editable Crystal Report with dynamic dataset, where it is possible to find details. Key answer is Re: How to create an editable previewable report?

  • Can I create a lot of instance with the same name?

    I have, for a project in my studies, to create a map for an adventure game. I must create monsters on this map. For this I use a class that I called Creature. In my class Map i have to initialise the monsters but I
    choose their quantity with Math.random() so I don't know how much the map will contain. If in a loop I do: Creature monster = new Creature(); will I have different instances with the same name(I doubt)? Will I have one monster re-created in each iteration of the loop? How can I do to have different monsters in different places (my map is a matrix 2x2)?

    You would have many Creature references made, but only one variable to hold them, and it would go out of scope outside your loop. You could create a Creature array or use a List (both defined outside your loop) - as
    // array
    int numCreatures = randomGeneratedCreatureQuantity();
    Creature[] monsters = new Creature[numCreatures];
    for (int j = 0; j < numCreatures; j++) {
        monsters[j] = new Creature();
    // Or a list
    int numCreatures = randomGeneratedCreatureQuantity();
    ArrayList monsters = new ArrayList();
    for (int j = 0; j < numCreatures; j++) {
        monsters.add(new Creature());
    }Good luck
    Lee

  • How to quickly create a test ADAM instance in the QA environment that is a replica of production ADAM but then disconnect it from production.

    I have restored from file backup an ADAM instance onto our QA server that was backedup from a production ADAM instance.
    The instance functions fine except that for stuff like FSMO roles, it still thinks its connected to the production ADAM instance.
    How can I completely disconnect and cut off this restored instance from production?
    I never want this replica to ever replicate with produciton again.
    This should be a standalone QA ADAM instance for testing only.
    The only thing I might want to do is add another QA ADAM server for this instance to replicate with.
    Thanks.

    Hi,
    When install a new ADAM instance, you have the option to replicate from another ADAM instance. After that, you can configure/delete site and replication information to prevent replication. Please refer to the following article.
    Administering replication and configuration sets
    http://technet.microsoft.com/en-us/library/cc783192(WS.10).aspx
    Manage Replication, Sites, and Configuration Sets
    http://technet.microsoft.com/en-us/library/cc786365(WS.10).aspx
    Also, other articles are very helpful, please read them to get more information.
    Thanks.
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • E-Recruiting - Created users in R/3 with a determinated prefix?

    Can I config E-Recruting to create the external candidate users in R/3 with a determinated prefix username (like user: ZERXXXXX). And can I set the roles that the new user have?
    Thx.

    Hello Pablo,
    there is no setting for defining the algorithm to generate the username for an external candidate. In standard sap generates the user as MD5 hash from the alias. As the external candidate logs in by using the alias sap thinks this is enough, although having a pattern for these users is quite handy in some situations e.g. for administration. A workaround here could be a usergroup. Since a note from 2009 SAP hands the usergroup assignment of the reference user to the user of the external candidate which can be very helpful. If you really want to influence the username the easiest option would be an enhancement to class CL_HRRCF_CANDIDATE_REGISTER method GENERATE_USERNAME. But be aware that the standard generates 11 letter/digit usernames to ensure uniqueness. If you add a prefix longer than 1 letter you should add some lines to check it.
    The roles for exernal candidates are much easier. As the whole authorization assignment to the external candidate is done through the reference user you are free to choose how you name the role(s) you assign to it. Two additional hints here. In spite of the reference user mechanism the authorization checks for role assignment are still in place so if you change the name of the roles for the external candidate be sure to adapt the role of the unregistered user accordingly. Furthermore DO NOT USE THE SAP STANDARD ROLES. The standard roles for the unregistered candidate and the recruiter allow the assignment of SAP_ALL to users!
    Best regards
    Roman

  • Creating users in enterprise portals with CUA as userbase

    Hi All,
       we are using CUA system for maintaining the users and we want this users to be used in enterprise portals. So while installing WebAs itself, we specified the connection details to this CUA system. then we installed portal and we were able to view the users of CUA in portal.
      now i am creating a user from portal, create user option in UserManagement. but i just get an error like, could not create a user.
    i checked out in system administration->umconfiguration-> sap system. all the details that we specified during the webas installation appear there by default.
    so could you please let me know what the problem could be
    thank you

    Raj,
    I know that your problem was solved, but I've come across following SAP link. Hope, it helps other ppl..
    TITLE: Requirements for Service User Used to Connect to SAP Systems
    http://help.sap.com/saphelp_ep60sp2/helpdata/en/8f/67d27676ace84080964d4c4223bb3c/content.htm
    Thanks,
    Pritesh.

  • Problem creating a new connection instance with MSVC7.1

    Hi all,
    I have a problem with MSVC7.1 and the OCCI library. I am getting an unhandled exception error when trying to create a new connection:
    con = env->createConnection (user, passwd, db);
    I have seen a thread about MSVC7.0 and the patchset 9.2.0.4, but is it true to say that this one is only fixing the problem with MSVC7.0?
    Does anyone know how I can get OCCI to work with MSVC7.1?
    Thanks,
    Niek

    Shankar,
    Thanks for the suggestion. Its a static executable so it shouldn't be looking for the DLL. I've put %ORACLE_HOME%\oci\lib\msvc\vc71 first in the PATH anyway, just in case we change to dynamic linking in future.
    Just in case it was linking to the worng oraocci10.lib I also temporarily renamed any oraocci10.lib libraries in any other directory under C: to xxxoraocci10.lib, just to be sure. The problem still occurs. Any other ideas please?
    The Visual Studio .NET 2003 link command is:
    /OUT:"C:\adapters_build\osmm_adapter\Debug/osmm_adapter.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\oracle\product\10.1.0\Client_1\oci\lib\msvc\vc71" /LIBPATH:"C:\oracle\product\10.1.0\Client_1\oci\lib\msvc" /NODEFAULTLIB /DEBUG /PDB:"C:\adapters_build\osmm_adapter\Debug/osmm_adapter.pdb" /SUBSYSTEM:CONSOLE /MACHINE:X86 ociw32.lib msvcrt.lib msvcprt.lib oraocci10.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
    User environment variable lib is:
    C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\;C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib;C:\Program Files\Microsoft Visual Studio\VC98\lib
    System environment variable LIB is: C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\
    regards
    Rich

  • NEED TO ENABLE BULK USERS on LYNC 2010 WITH POWERSHELL using SAMACCOUNTNAME

    Currently I am using following command;
    Import-Csv C:\Scripts\Users.csv | ForEach-Object{$varUserId=$_.userid; Enable-CsUser -Identity $varUserid -RegistrarPool gn-a-if-lync01.iyogi.net -SipAddressType samaccountname -sipdomain iyogi.net}
    WHENEVER I RUN THIS COMMAND I GET FOLLOWING ERROR, MAY BE SOMETHING IS WRONG HERE:
    Enable-CsUser : Management object not found for identity "waseem.raza".
    At C:\Scripts\lyncuser.ps1:1 char:85
    + Import-Csv C:\Scripts\Users.csv | ForEach-Object{$varUserId=$_.userid; Enable
    -CsUser <<<<  -Identity $varUserid -RegistrarPool gn-a-if-lync01.iyogi.net -Sip
    AddressType samaccountname -sipdomain iyogi.net}
        + CategoryInfo          : NotSpecified: (:) [Enable-CsUser], ManagementExc
       eption
        + FullyQualifiedErrorId : Microsoft.Rtc.Management.AD.ManagementException,
       Microsoft.Rtc.Management.AD.Cmdlets.EnableOcsUserCmdlet
    Any help is appreciated :)
    Thanks,
    RIWAA
    RIWA

    Hi RIWAA,
    The help for Enable-CsUser clearly states that sAMAccountName is not a valid option for the Paramter -Identity
    I quote the description of the paramter:
    "Indicates the Identity of the user account to be enabled for Lync Server. User Identities can be specified
    by using one of four formats: 1) the user's SIP address; 2) the user's user principal name (UPN); 3) the user's domain name and logon name, in the form domain\logon (for example, litwareinc\kenmyer); and, 4) the user's Active Directory display name (for example,
    Ken Myer). You can also reference a user account by using the user’s Active Directory distinguished name.
    You can use the asterisk (*) wildcard character when using the Display Name as the user Identity. For example, the Identity "* Smith" returns all the user who have a display name that ends with the string value " Smith"."

  • Set multi user column with PowerShell used to work in 2010 but no longer works in 2013

    In SharePoint 2010 I used PowerShell to set the value of multi user people columns and it worked really well.  I attempt to use the same PowerShell to set the same column type in SharePoint 2013 and it fails.
    here is the PowerShell that I use in 2010:
    $web = Get-SPWeb "http://intranet"
    $list = $web.lists["TestList"]
    $item = $list.items.add()
    $item["Title"] = "Test multi user column"
    $users = @("Domain\user1", "Domain\user2")
    $userList = new-object Microsoft.SharePoint.SPFieldUserValueCollection
    foreach($user in $users)
    $spUser = $web.EnsureUser($user)
    $userValue = new-object Microsoft.SharePoint.SPFieldUserValue($web, $spUser.ID, $spUser.Name)
    $userList.Add($userValue)
    $item["MultiUserColumn"] = $userList
    $item.update()
    I have used this on three SharePoint 2013 farms with differing results.  On two of them I receive an error when running $item.update(): Exception calling "Update" with "0" argument(s): "Invalid look-up value.  A look-up
    field contains invalid data. Please check the value and try again."
    If I take one of the users out of the $users list then it works fine, but it will not allow multiple users to be set with PowerShell.  I can use the GUI to add more than one user but not PowerShell.
    Does anyone know if these methods have changed in 2013? I haven't been able to find anyone else with this issue.
    mmm... coffee...

    Not sure but maybe something to do with casting. Below is the code snippet from one of the blogs. Try modifying your script like below and see if still you get the error
    [Microsoft.SharePoint.SPFieldUserValueCollection]$lotsofpeople = New-Object Microsoft.SharePoint.SPFieldUserValueCollection
    $user1 = $w.EnsureUser("domain\user1");
    $user1Value = New-Object Microsoft.SharePoint.SPFieldUserValue($w, $user1.Id, $user1.LoginName)
    $user2 = $w.EnsureUser("domain\user2");
    $user2Value = New-Object Microsoft.SharePoint.SPFieldUserValue($w, $user2.Id, $user2.LoginName);
    $lotsofpeople.Add($user1Value);
    $lotsofpeople.Add($user2Value);
    $i["lotsofpeoplefield"] = $lotsofpeople;
    $i.Update();
    #-or-
    $l.Fields["lotsofpeoplefield"].ParseAndSetValue($i,$lotsofpeople);
    $i.Update();
    Reference to the link
    http://social.technet.microsoft.com/wiki/contents/articles/20831.sharepoint-a-complete-guide-to-getting-and-setting-fields-using-powershell.aspx
    Geetanjali Arora | My blogs |

  • GP logon script with PowerShell

    We have a Windows Server 2012 domain and would like to create a GP logon script with PowerShell.
    So if you execute the .ps1 file, the specified logon script settings (including parameters) would be applied automatically in the GP.
    Any idea of such command line?

    Thanks for the tips!
    May not be the easiest solution, but it works:
    I created a backup of the GPO set fully graphical interface, and I've copied ps1 file in the same folder.
    #Start
    #Create GPO
    $gponame = "Program_AutoStart"
    Write-Host ""
    $ou = Read-Host "What is your Organisational Unit name?"
    Write-Host ""
    $enforce = Read-Host "Do you want enforce Group Policy link? (Yes/No)"
    $dc1 = $env:userdnsdomain
    $dc1length = $env:userdnsdomain.Length
    $dc1s = $env:userdnsdomain.Split(".")
    $dc1count = $dc1s[$dc1s.Count-1].Length+1
    $dc1max = $dc1length-$dc1count
    $dc1 = $dc1.Substring(0,$dc1max)
    $dc2 = $env:userdnsdomain.Split(".")
    $dc2 = $dc2[$dc2.Count-1]
    Write-Host ""
    Write-Host -Object "Create a new Group Policy Object..."
    #replace GPO settings
    ##backup.xml file
    $backupFilePath = ".\backup\{2F708EB2-F154-4739-8F6D-1F16C954649C}\Backup.xml"
    $content = Get-Content -path $backupFilePath
    $content | foreach { $_.Replace("mydomainname","$env:userdnsdomain") } | Set-Content $backupFilePath
    $content = Get-Content -path $backupFilePath
    $content | foreach { $_.Replace("mycomputername","$env:COMPUTERNAME") } | Set-Content $backupFilePath
    $content = Get-Content -path $backupFilePath
    $content | foreach { $_.Replace("mynetbiosname","$env:userdomain") } | Set-Content $backupFilePath
    ##backup.xml file
    $bkupinfoFilePath = ".\backup\{2F708EB2-F154-4739-8F6D-1F16C954649C}\bkupinfo.xml"
    $content = Get-Content -path $bkupinfoFilePath
    $content | foreach { $_.Replace("mydomainname","$env:userdnsdomain") } | Set-Content $bkupinfoFilePath
    $content = Get-Content -path $bkupinfoFilePath
    $content | foreach { $_.Replace("mycomputername","$env:COMPUTERNAME") } | Set-Content $bkupinfoFilePath
    $content = Get-Content -path $bkupinfoFilePath
    $content | foreach { $_.Replace("mynetbiosname","$env:userdomain") } | Set-Content $bkupinfoFilePath
    ##gpreport.xml file
    $gpreportFilePath = ".\backup\{2F708EB2-F154-4739-8F6D-1F16C954649C}\gpreport.xml"
    $programexe = "$env:logonserver\$share\My_Program\program.exe"
    $content = Get-Content -path $gpreportFilePath
    $content | foreach { $_.Replace("mycommand","$programexe") } | Set-Content $gpreportFilePath
    Write-Host ""
    $parameters = Read-Host "Add your parameters"
    $content = Get-Content -path $gpreportFilePath
    $content | foreach { $_.Replace("myparameters","$parameters") } | Set-Content $gpreportFilePath
    ##scripts.ini file
    $gpreportFilePath = ".\backup\{2F708EB2-F154-4739-8F6D-1F16C954649C}\DomainSysvol\GPO\User\Scripts\scripts.ini"
    $content = Get-Content -path $gpreportFilePath
    $content | foreach { $_.Replace("mycommand","$programexe") } | Set-Content $gpreportFilePath
    $content = Get-Content -path $gpreportFilePath
    $content | foreach { $_.Replace("myparameters","$parameters") } | Set-Content $gpreportFilePath
    #Import GPO and link
    Write-Host ""
    Write-Host -Object "Import Group Policy settings..."
    Import-GPO -BackupGpoName "$gponame" -TargetName "$gponame" -Path ".\backup" -CreateIfNeeded
    New-GPLink -Name "$gponame" -target "ou=$ou,dc=$dc1,dc=$dc2" -Enforced $enforce -LinkEnabled Yes
    #Replace undo
    ##backup.xml file
    $content = Get-Content -path $backupFilePath
    $content | foreach { $_.Replace("$env:userdnsdomain","mydomainname") } | Set-Content $backupFilePath
    $content = Get-Content -path $backupFilePath
    $content | foreach { $_.Replace("$env:COMPUTERNAME","mycomputername") } | Set-Content $backupFilePath
    $content = Get-Content -path $backupFilePath
    $content | foreach { $_.Replace("$env:userdomain","mynetbiosname") } | Set-Content $backupFilePath
    ##backup.xml file
    $content = Get-Content -path $bkupinfoFilePath
    $content | foreach { $_.Replace("$env:userdnsdomain","mydomainname") } | Set-Content $bkupinfoFilePath
    $content = Get-Content -path $bkupinfoFilePath
    $content | foreach { $_.Replace("$env:COMPUTERNAME","mycomputername") } | Set-Content $bkupinfoFilePath
    $content = Get-Content -path $bkupinfoFilePath
    $content | foreach { $_.Replace("$env:userdomain","mynetbiosname") } | Set-Content $bkupinfoFilePath
    ##gpreport.xml file
    $content = Get-Content -path $gpreportFilePath
    $content | foreach { $_.Replace("$programexe","mycommand") } | Set-Content $gpreportFilePath
    $content = Get-Content -path $gpreportFilePath
    $content | foreach { $_.Replace("$parameters","myparameters") } | Set-Content $gpreportFilePath
    ##scripts.ini file
    $content = Get-Content -path $gpreportFilePath
    $content | foreach { $_.Replace("$programexe","mycommand") } | Set-Content $gpreportFilePath
    $content = Get-Content -path $gpreportFilePath
    $content | foreach { $_.Replace("$parameters","myparameters") } | Set-Content $gpreportFilePath
    #End

  • Invalid Naming Error while creating user in OIM and provisioning to OID

    Hi,
    I am trying to create users in OIM. As per the access policy, the users will directly provisioned to OID. When I am creating users in OIM, its showing provisioning for OID user resource. The create user task is rejected with error as
    "Response: Invalid Naming Error
    Response Description: Naming exception encountered"
    If anybody is getting these error, then please suggest a solution.
    Thanks.

    logs ???
    Are you provisioning any custom attributes of different object classes . Make sure you include those object classes as well , go to connector documentation for adding the object classes .., may be some configuration look up ....i guess
    Thanks
    Suren
    Edited by: Suren on Jul 6, 2010 7:41 PM

  • Want to add a prepopulated User defined field in create user form

    Hi,
    I have an entity adapter which will perform a pre-insert check on the user group of the user logged in to the oim.
    If the logged in user belongs to a group say "IT ADMIN", another validation check will be imposed on the create user action performed by him.
    If not from "IT ADMIN" group then create user action will be handled normally.
    Now the catch is, how would I determine the group name of the user logged in from the adapter code I have written?
    I decided to keep an User defined field "Created by" in the create user form which will be non-editable and auto-prepopulated with the group name of the logged in user. This way I will be able to map the variable field from the User definition drop down list while mapping the adapter variables.
    May you please guide me how I can achieve this?
    Would highly appreciate suggestion/inputs.

    Thanks for all your replies!
    However I am still in dark.
    I tried to retrieve the groupname using tcUSerOperationsIntf. But iit tries to retrieve the group name of the user getting created.
    Please note, the group name I want is not of the user yet to get created, but that of the user creating it i.e., the logged in user.
    My requirement is to have this created_by field in the create user form already prepopulated with the group name of the logged in user.
    So that I can put a check based on this field value in the netity adapter.
    If the group is IT ADMIN then proceed with the validation.
    Else no validation required.
    In short, I want to know,how can I auto-prepopulate a UDF in Create USer form?

  • How to create users in/for FDQM mapping maintenace

    Client wants to know that is it possible to create users in/for FDQM with different rights. Like for example the admin user will be overall responsible for mapping maintenace and data load but they also want to make a user just for mapping maintenace and it should not have the right to load data. Is this possible and if yes then how?
    Thanks in advance.
    Regards

    User maintenance is simply used for assigning location access for users, shared services determines the role to user has i.e. Admistrator or Intermediate 1-9 etc. If you take a look at object maintenance you will see that you can make all the FDM objects listed there only available for certain roles by default most of these are set to All Intermediate or Administartor. What I would do is create a more targetted obect security model and then through the allocation of the appropriate Intermediate roles you should be able to achieve the functionality your client is requesting

  • Add user to Netinfo database with Applescript

    Does anyone have an example Applescript that would allow us to add a user to the local Netinfo Database on a computer? We would like to push this to a lab of computers to add a new local user to all computers at once.
    thanks

    See this article for some Terminal commands which can be used. To run these from an AppleScript, use code such as:
    set the_password to "password"
    do shell script "nicl . -create /users/username" password the_password with administrator privileges
    continuing the code for the rest of the commands in step 4 the article modified as needed. If you aren't creating a group, skip the line to append the user to the group and remove the group name from the chmod. The passwd command is interactive and cannot be executed from within AppleScript.
    (18463)

  • This is how to bulk create users programatically (source code included)

    After scouring all of the related forums and gathering all of
    the clips of code and viewing all of the comments and docs on
    the api's, I have found a working means of bulk loading my users
    into portal from my previous system...
    NOTE: THIS CODE SHOULD BE USED VERY CAREFULLY, AS, IT CAN REALLY
    DESTROY YOUR SYSTEM MAYBE EVEN YOUR HARDWARE AND IN REARE CASES,
    BRING WORLD WIDE PLAGUES ACCOMANIED BY WEIGHT GAIN...
    Now, the only thing it does not do is trap the error of trying
    to create a user that already exists.
    If, only someone would give me a job doing this stuff (hint,
    hint):
    DECLARE
    CURSOR user_cursor IS
    /* Add your own query to get needed data
    for import.... this is mine coming from a
    migrated SQL2000 db...
    SELECT
    "SYSTEM"."OnlineProfiles"."LogonName",
    "SA"."EMPLOYEES"."EMPLOYEEID",
    "SA"."EMPLOYEES"."LAST_NAME",
    "SA"."EMPLOYEES"."FIRST_NAME",
    "SA"."EMPLOYEES"."MIDDLE_NAME",
    "SA"."EMPLOYEES"."DOB",
    "SA"."EMPLOYEES"."EMAIL",
    "SA"."EMPLOYEES"."PHONE",
    "SA"."EMPLOYEES"."STREET_ADDRESS",
    "SA"."EMPLOYEES"."APT",
    "SA"."EMPLOYEES"."CITY",
    "SA"."EMPLOYEES"."STATE",
    "SA"."EMPLOYEES"."ZIP",
    "SA"."EMPLOYEES"."DISTRICT",
    "SA"."EMPLOYEES"."JOB",
    "SA"."EMPLOYEES"."DATEOFHIRE",
    "SYSTEM"."OnlineProfiles"."Password"
    from "SA"."EMPLOYEES", "SYSTEM"."OnlineProfiles"
    WHERE "SA"."EMPLOYEES"."EMPLOYEEID"
    = "SYSTEM"."OnlineProfiles"."EmployeeID";
    P_USER_NAME VARCHAR2(256);
    P_EMPNO VARCHAR2(30);
    P_LAST_NAME VARCHAR2(60);
    P_FIRST_NAME VARCHAR2(60);
    P_MIDDLE_NAME VARCHAR2(60);
    P_DATE_OF_BIRTH DATE;
    P_EMAIL VARCHAR2(256);
    P_HOME_PHONE VARCHAR2(30);
    P_HOME_ADDR1 VARCHAR2(60);
    P_HOME_ADDR2 VARCHAR2(30);
    P_HOME_CITY VARCHAR2(30);
    P_HOME_STATE VARCHAR2(30);
    P_HOME_ZIP VARCHAR2(30);
    P_ORGANIZATION VARCHAR2(150);
    P_TITLE VARCHAR2(80);
    P_HIREDATE DATE;
    P_PASSWORD VARCHAR2(30);
    l_uid number(32);
    l_gid number(32);
    l_errno number(30);
    l_group varchar2(100) := 'BDS_USERS'; -- All users added to same
    group
    l_debug number(10) := 0;
    BEGIN
    OPEN user_cursor;
    LOOP
    FETCH user_cursor INTO P_USER_NAME,
    P_EMPNO,
    P_LAST_NAME,
    P_FIRST_NAME,
    P_MIDDLE_NAME,
    P_DATE_OF_BIRTH,
    P_EMAIL,
    P_HOME_PHONE,
    P_HOME_ADDR1,
    P_HOME_ADDR2,
    P_HOME_CITY,
    P_HOME_STATE,
    P_HOME_ZIP,
    P_ORGANIZATION,
    P_TITLE,
    P_HIREDATE,
    P_PASSWORD;
    EXIT WHEN user_cursor%NOTFOUND;
    l_debug := 1; -- Add user to portal...
    l_uid := portal30.wwsec_api.add_portal_user(
    p_user_name =>P_USER_NAME,
    p_portal_user => 'Y',
    p_Display_Personal_Info=>'Y',
    p_Known_As=>P_FISRT_NAME,
    p_Organization=>P_ORGANIZATION,
    p_Empno=>P_EMPNO,
    p_Last_Name=>P_LAST_NAME,
    p_First_Name=>P_FIRST_NAME,
    p_Middle_Name=>P_MIDDLE_NAME,
    p_Date_Of_Birth=>P_DATE_OF_BIRTH,
    p_Email=>P_EMAIL,
    p_Home_Phone=>P_HOME_PHONE,
    p_Home_Addr1=>P_HOME_ADDR1,
    p_Home_Addr2=>P_HOME_ADDR2,
    p_Home_City=>P_HOME_CITY,
    p_Home_State=>P_HOME_STATE,
    p_Home_Zip=>P_HOME_ZIP,
    p_Organization=>P_ORGANIZATION,
    p_Title=>P_TITLE,
    p_Hiredate=>P_HIREDATE);
    l_debug := 2; -- Create a User for Login Server...
    portal30_sso.wwsso_api_user_admin.create_user
    (P_USER_NAME
    ,P_PASSWORD
    ,P_EMAIL
    ,sysdate
    ,null
    ,FALSE
    ,l_errno);
    l_debug := 3; -- Get default group id number...
    l_gid := portal30.wwsec_api.group_id(l_GROUP);
    l_debug := 4; -- Activate new user...
    portal30.wwsec_api.add_user_to_list(l_uid, l_gid, 0);
    l_debug := 5; -- Assign new user to default group...
    portal30.wwsec_api.set_defaultgroup(p_groupid =>
    l_gid,p_username => P_USER_NAME);
    l_debug := 51;
    commit;
    l_debug := 6; -- Output progress to screen...
    htp.p('Created User : '||P_USER_NAME||' UID '||l_uid||'
    with the Group ID '||l_gid||htf.br);
    END LOOP;
    CLOSE user_cursor;
    END;
    Enjoy!
    PS someone write the trap for the unique constraint violation
    and email it to me....
    Bryancan

    Sorry had a couple of typos in there... this one works...
    DECLARE
    CURSOR user_cursor IS
    SELECT
    "SYSTEM"."OnlineProfiles"."LogonName",
    "SA"."EMPLOYEES"."EMPLOYEEID",
    "SA"."EMPLOYEES"."LAST_NAME",
    "SA"."EMPLOYEES"."FIRST_NAME",
    "SA"."EMPLOYEES"."MIDDLE_NAME",
    "SA"."EMPLOYEES"."DOB",
    "SA"."EMPLOYEES"."EMAIL",
    "SA"."EMPLOYEES"."PHONE",
    "SA"."EMPLOYEES"."STREET_ADDRESS",
    "SA"."EMPLOYEES"."APT",
    "SA"."EMPLOYEES"."CITY",
    "SA"."EMPLOYEES"."STATE",
    "SA"."EMPLOYEES"."ZIP",
    "SA"."EMPLOYEES"."DISTRICT",
    "SA"."EMPLOYEES"."JOB",
    "SA"."EMPLOYEES"."DATEOFHIRE",
    "SYSTEM"."OnlineProfiles"."Password"
    from "SA"."EMPLOYEES", "SYSTEM"."OnlineProfiles"
    WHERE "SA"."EMPLOYEES"."EMPLOYEEID"
    = "SYSTEM"."OnlineProfiles"."EmployeeID";
    P_USER_NAME VARCHAR2(256);
    P_EMPNO VARCHAR2(30);
    P_LAST_NAME VARCHAR2(60);
    P_FIRST_NAME VARCHAR2(60);
    P_MIDDLE_NAME VARCHAR2(60);
    P_DATE_OF_BIRTH DATE;
    P_EMAIL VARCHAR2(256);
    P_HOME_PHONE VARCHAR2(30);
    P_HOME_ADDR1 VARCHAR2(60);
    P_HOME_ADDR2 VARCHAR2(30);
    P_HOME_CITY VARCHAR2(30);
    P_HOME_STATE VARCHAR2(30);
    P_HOME_ZIP VARCHAR2(30);
    P_ORGANIZATION VARCHAR2(150);
    P_TITLE VARCHAR2(80);
    P_HIREDATE DATE;
    P_PASSWORD          VARCHAR2(30);
    l_uid number(32);
    l_gid number(32);
    l_errno number(30);
    l_user varchar2(100);
    l_group varchar2(100) := 'BDS_USERS';
    l_debug number(10) := 0;
    BEGIN
    OPEN user_cursor;
    LOOP
    FETCH user_cursor INTO P_USER_NAME,
              P_EMPNO,
              P_LAST_NAME,
              P_FIRST_NAME,
              P_MIDDLE_NAME,
              P_DATE_OF_BIRTH,
              P_EMAIL,
              P_HOME_PHONE,
              P_HOME_ADDR1,
              P_HOME_ADDR2,
              P_HOME_CITY,
              P_HOME_STATE,
              P_HOME_ZIP,
              P_ORGANIZATION,
              P_TITLE,
              P_HIREDATE,
              P_PASSWORD;
         EXIT WHEN user_cursor%NOTFOUND;
         l_debug := 1;
         l_uid := portal30.wwsec_api.add_portal_user(p_user_name
    =>P_USER_NAME,p_portal_user => 'Y',
    p_Organization=>P_ORGANIZATION,
    p_Empno=>P_EMPNO,
    p_Last_Name=>P_LAST_NAME,
    p_First_Name=>P_FIRST_NAME,
    p_Middle_Name=>P_MIDDLE_NAME,
    p_Date_Of_Birth=>P_DATE_OF_BIRTH,
    p_Email=>P_EMAIL,
    p_Home_Phone=>P_HOME_PHONE,
    p_Home_Addr1=>P_HOME_ADDR1,
    p_Home_Addr2=>P_HOME_ADDR2,
    p_Home_City=>P_HOME_CITY,
    p_Home_State=>P_HOME_STATE,
    p_Home_Zip=>P_HOME_ZIP,
    p_Title=>P_TITLE,
    p_Hiredate=>P_HIREDATE);
         l_debug := 2;
         portal30_sso.wwsso_api_user_admin.create_user
    (P_USER_NAME
         ,P_USER_NAME
         ,P_USER_NAME||'@getbenefits.com'
         ,sysdate
         ,null
         ,FALSE
         ,l_errno);
         l_debug := 3;
         l_gid := portal30.wwsec_api.group_id(l_GROUP);
         l_debug := 4;
         portal30.wwsec_api.add_user_to_list(l_uid, l_gid, 0);
         l_debug := 5;
         portal30.wwsec_api.set_defaultgroup(p_groupid =>
         l_gid,p_username => P_USER_NAME);
         l_debug := 51;
         commit;
         l_debug := 6;
         htp.p('Created User : '||P_USER_NAME||' UID '||l_uid||'
    with the Group ID '||l_gid||htf.br);
    END LOOP;
    CLOSE user_cursor;
    END;

Maybe you are looking for

  • I Installed JDK but there is no Icon! Help!

    Hello, I installed JDK and it says it's installed yet I cannot find out how to start it up to do my "Hello World" test (I am new to this programming thing). What should I do to find the Java programming application I just installed? Thank you in adva

  • Changing Location for Temp Files

    My computer has a 20 GB Partion on a 150 GB drive that Encore is writing the temp files to. My question is can I change the directory that the files are written to? Regards, Jim Brown Harris Multimedia Services

  • Push Button In Forms6i

    hello Oracle Gurus, I need ur help, I have created a push button whose function is the same as the push button functions in windows explorer,i mean to say when i press the button for the first time i get the data ordered in ascending order and when t

  • Does sunstudio support c++0x now ?

    I found Support for C++0x in Sun Studio said sunstudio will support c++0x after c++0x publication . does sunstudio support c++0x now? if not ,what is the plan to support ?

  • Backing up home folder

    Not really a MBP specific question but it's on one! I'm doing a clean install to upgrade from 10.5.8 to 10.6 so backing up everything to an external HD. Appart from whatever folders I've created for my own files, how do I back up email and home folde