Identify the user logged in to the application

Hi Guys,
I am trying to integrate APEX(4.0.1) with oracle SSO, using the doc "Corporate Single-Sign On Integration Process"   http://my.oracle.com/site/pdit/BusinessOpsIT/IdentityMgmtSvs/CorporateSSOPartnerApplicationRequest 
Now that i have installed APEX with EPG (Embedded PL/SQL Gateway), i have tried to integrate sso using the note "562807.1", i was able to successfully authenticate the user, but unfortunately am not able to redirect to application after authentication(goes to a blank page), SR has been raised but couldn't get any further.
As a work around i have installed APEX using OHS and integrated it with WEBGATE and integrated it with sso (http://my.oracle.com/site/pdit/BusinessOpsIT/IdentityMgmtSvs/webgateHowTo).
I have used  DAD confg as the APEX level authentication(No Authentication (using DAD)).
Everything worked successfully, now able to login to the application using Oracle ID, but once logged in to the application am not able to identify the user name, as it shows the APEX_PUBLIC_USER in the APP_USER variable.
please help me to identify the username logged in to the application.
Thanks and Regards,
Harish

Hi Sean,
That thread is taking about the UDF and FMS.  If you need get the user name on the PLD, that is necessary first step.  You have to create an UDF first and then assign that FMS query.  After this step, you will be able to put this new field on your PLD.
Thanks,
Gordon

Similar Messages

  • Identify the Application Version Cs/Cs2/Cs3???

    Hi All,
    I need to identify the Application Version [Cs/Cs2/Cs3].
    Is there any way to identify using javascript???
    Regards,
    Ramkumar .P

    It's not the endianness inside single bytes (thank the Silicon Gods for that!).[*] It's when you are working with values that require more than a single byte -- i.e., everything above 255 (which is the highest value that can be expressed -- normally -- with a single byte).
    Everyone can see that 4589 is less than 9341, even though it has the same number of digits, because, well, the first one's rightmost digit is '9' and the second one's is '1' but that doesn't make sense, because it's the leftmost digit that counts most.
    You're thinking, "Sure, but what about that endianness thingy?"
    It's the same thing. Suppose you get two 2-byte values:
    (a) 123 and 85
    (b) 86 and 100
    Which 2-byte value is the largest? Well, obviously it's the first one, as the most significant part (123) is clearly larger than that of the other (86). Now suppose you have to design a computer chip, and you have to decide in which order to store 2-byte values. It's quite obvious to you, me, and, for example, Motorola engineers, how you would do that: most significant byte first, then least significant.
    Unfortunately, the designers of the most prevalent microchip to date, Intel, decided to do it ... the other way around. (Insert appropriate smiley/sad face/horror here). For some reason, they reckoned it useful to store the least significant part first. Remember, back in "the day" when this was decided, using two bytes to store a number was ... well, how golly big numbers do you computer techies want to process!? Two bytes, that's up in the thousands! Imagine!
    So I imagine there must have been a highly technical reason for it.
    The term "endianness", by the way, comes from Gulliver's Travels -- which, I'm sure, most of you read. Remember the Civil Wars on which end to start eating an egg?
    Applying this to the (a) and (b) numbers, when you are asked "what is the bigger two-byte number?", then you ask "Is it Most Significant Byte first, or Least Significant first?" Is it the former, then it's (a); for the latter, it's (b).
    [*] Above-criticized engineers had no problem in deciding that in
      10010001
    the highest bit value (128) is always on the left, and the lowest (1) is always on the right.

  • Need help identifying the application responsible for an insert...

    Hi,
    I'm a MSSQL guy and Oracle is still a bit mysterious to me.  I'm looking for some assistance tracking down the application in an environment which is responsible for particular inserts.
    For example, suppose I have 10 different programs running and inserting values to a DB.  I need to know which one of them inserts a "0" in a particular column.
    I found a trigger which will tell me the user, unfortunately these programs use a shared credential so that doesn't help me.... here's what I've got:
    CREATE OR REPLACE TRIGGER check_for_zero_insert
    AFTER INSERT
      ON DATA_TABLE_0001
      FOR EACH ROW
    DECLARE
      v_username varchar2(10);
    BEGIN
      -- Find username of person performing the INSERT into the table
      SELECT user INTO v_username
      FROM dual;
      -- Insert record into audit table
      INSERT INTO audit_table
      ( samplevalue
      sampletime,
      username )
      VALUES
      ( :sampletime,
      :samplevalue
       v_username );
    END;
    But again, username won't help me, I need the originating process if at all possible (either an executable name, PID, or something to identify the specific application on the other side.)

    use this in your trigger
    select sys_context('USERENV','OS_USER') ||'-' ||user  into v_username from dual;
    You might need to increase the v_username data type length.
    Thanks,
    GPU

  • Programatically identify the application server vendor

    Hi everyone,
    We have just passed J2EE certification for an application migrated from WebLogic to NetWeaver 6.40.
    Now, we are trying to merge code and resources as much as possible, but there are part of the code where it is just not possible to write generic, and we want to detect what is the type of the application server running.
    Is there any simple code to write - like some env/system property to check - which makes it possible to know that we are running on SAP's J2EE engine ?
    Any help is appreciated,
    Thanks

    Hi Vladimir,
    Thanks for the proposal, I will try to implement it and see how it is handy.
    Actually, the original application is targetted to version 8.1 SP4 of WebLogic app server, which is rather loose on some aspects of the J2EE specifications. Namely it doesn't care when you use non-XA resources, i.e. execute local transactions, when a JTA transaction has already started.
    Our application makes use of this "looseness" for performance gain, i.e. some transactions need not be part of the global transaction and makes the system overall faster when executed as local. This also allows flexibility whether we want to privilege performance or data consistency without changing the code.
    NetWeaver's J2EE engine, on the contrary, has a strict constraint on this: if a JTA transaction is started, every transactional resource used thereafter must be XA. Conversely, if not JTA transaction was started, then XA resources cannot be used.
    As we want to keep the flexibility to use XA or non-XA resources without changing the source code, parts of the code involving JTA transactions and XA/non-XA resources should be switched depending on the app server type.
    But I just realized we might as well just test the class of resources involved...
    I will give you points after tested your proposal.

  • How to identify the application accessing the ESB service?

    Hi All,
    We have few applications accessing a single service deployed on ESB server.
    ESB server is a Linux server with the complete SOA Suite Installation done.
    Where on the ESB or the server can we locate or if there are any logs which could help us identify which application is accessing the service.
    Any direction on this would be really very helpful.
    Thanks & Regards,
    Shilpa

    Well, you haven't disclosed too much information. How would you like to identify an application? What protocol is in use? Is there any authentication involved? Is it possible for you to send a unique application id with each request on your own?
    It all depends on what you have and what you need. In many cases, I would be happy with client IP address in my HTTP access.log ...

  • Identify the application server programatically

    Hi,
    Can anyone help me how to detect that how to programatically identify which application server is being used by my web application?
    Thank you in advance.

    I want to identify which application server my application is using.I want to do this programatically.so it the server is weblogic, weblogic specific actions can be performed.If the server is websphere, websphere server specific actions i will perform.

  • How to know the number of Active users logged in to a Essbase  Application?

    Hi,
    Is there way to capture/log the number of active users who have logged into a particular Essbase application at a given time.
    In Essbase or in Shared services?
    I know we can see the EAS-Edit Sessions shows the actively logged-in users, then we can sort on the application/database & manually count the number.
    Is there a way to capture it in a log at a given time on a regular basis. Any MAXL or Shared services feature?
    Appreciate your thoughts.
    Thanks,
    Ethan.

    You could use maxl .
    display user all;
    there will be a column called "logged in" which will display true/false for the users
    but that will just show if they are logged into the server and not the application
    You can also use use display session
    display session all;
    or
    display session on application sample;
    which should show what you are after.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Application should start automatically as soon the user logs into windows.

    Hello All,
    I have a requirement.
    I am developed a time sheet application using web dynpro. This application is configured on the portal & is working fine. Now, I want to make some changes, may be at Portal Content side or Application side, but want this -
    As soon as the User loges into the Windows with user id & password, this timesheet application residing on the portal should start automatically and should record the time. Similarly, if the user shuts-down, the application should again record the time. Thus giving the actual time the user worked.
    Please reply. Thanks.
    Best Regards
    Chander Kararia

    Hello Satyajit,
    Below are the comments on your queries.
    1. It would be better if the application starts silently. But, in case, if we choose other way i.e the browser opens automatically and displays the application (expecting the button needs to be clicked by the user) that will also do.
    2. In case of system shut-down, I am still to come up with some materialized concept. But, here are few ideas...
        a). The application should check if the time entry is available for the current date. If so, should display the text for LogOut only. This will make user understand not to hit it.
        b). It should keep on accepting all the sessions (logging & logout) n number of times for the current date.
    I would prefer (b) as a better option.
    If you have some more conceptual idea, please suggest.
    Best Regards
    Chander Kararia

  • How to popup a msg from Oracle to all appl users logged in the Application

    Hi All,
    We are using Forms/Reports6i and database oracle9i
    Does Oracle provide any message broadcast method to send messages to the Application users which are currently using the application.
    If not then how it will be performed.
    Suppose we have to send some server maintenance messages to all users so only all application users who are logged in to application must get these messages.No other users.....
    For Example: 1 Server and 200 Application Users logged in..I want to send any message in oracle to all of them after they are logged in the application.
    Advance Thanks

    no - you have to wait till the next forms release. there you can do it
    in between you have to work with timers, which query in the db, if there are new message for the user. build a news-table where you look into. Or build an AQ and write get-functions in db-packages, which you use in forms 6i for reading in the AQ.
    but don't use (if possible) this timers in the web, because your performance will have problems then

  • To know the application server a user is logged on to.

    Hi,
    We have EP6 running on a central instance and 2 application servers.
    How can i know to which application server did the user logged on to?
    I need the information because when a user say that he is having performance problem, i need to know to which application server he has logged onto so that i can know the exact problem.
    Thanks,
    Sandeep

    Try throwing this in the url:
    javascript:alert(document.cookie);
    Regards,
    Patrick
    (props to the cork)

  • Details of users who have logged into the application

    I have installed oracle 10g Forms and services and oracle database 10g in the server.The users will run the application from the client machine. I want to know how many users are accessing the application and their ip address .
    Please let me know.
    Thanks.

    Hi
    Try this Code.
    SELECT MACHINE, OSUSER, TERMINAL, UTL_INADDR.GET_HOST_ADDRESS(TERMINAL) IP_ADDRESS FROM V$SESSION WHERE STATUS = 'ACTIVE'If you want to get the details of all users including Disconnected users, then use the following query
    SELECT MACHINE, OSUSER, TERMINAL, UTL_INADDR.GET_HOST_ADDRESS(TERMINAL) IP_ADDRESS FROM V$SESSION WHERE NVL(TERMINAL, ' ') <> 'UNKNOWN'Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.
    Edited by: Manu. on Aug 4, 2009 10:09 AM

  • Need a script to update AD information from Excel file, however employee ID is use for identify the user in AD

    Please help me to get this done!....Thanks in Advance
    This is current script I use to update AD record but its taking user id to pick the user in AD, which is some time give error not update properly..
    # UpdateUsers.ps1
    # PowerShell program to update Active Directory users from the information in a
    # Microsoft Excel spreadsheet. Only single-valued string attributes supported.
    # Author: Richard Mueller
    # PowerShell Version 1.0
    # September 12, 2011
    Trap
        If ("$_".StartsWith("Cannot load COM type Excel.Application"))
            "Excel application not found, program aborted"
            Add-Content -Path $LogFile -Value "## Excel application not found"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        If (("$_".StartsWith("Exception has been thrown")) -and ($Step -eq "4"))
            "Excel spreadsheet not found, program aborted"
            Add-Content -Path $LogFile -Value "## Excel spreadsheet not found: $ExcelPath"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        If ("$_".StartsWith("The server is not operational"))
            "Domain Controller not found, program aborted"
            Add-Content -Path $LogFile -Value "## Domain Controller not found"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        If ("$_".StartsWith("The directory service is unavailable"))
            "Active Directory not found, program aborted"
            Add-Content -Path $LogFile -Value "## Active Directory not found"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        If ("$_".StartsWith("The specified domain"))
            "Domain not found, program aborted"
            Add-Content -Path $LogFile -Value "## Domain not found"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        "Unexpected error: $_"
        Add-Content -Path $LogFile -Value "## Unexpected error: $_"
        Add-Content -Path $LogFile -Value "   Step: $Step"
        Break
    Function CleanUp
        Trap
            "Error during cleanup: $_"
            Add-Content -Path $LogFile -Value "## Error during cleanup: $_"
            $Script:Errors = $Script:Errors + 1
            Continue
        # Function to release Excel objects from memory.
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Columns)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Rows)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Range)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Sheet)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Worksheets)} While ($x -gt -1)
        $Workbook.Close($False)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Workbook)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Workbooks)} While ($x -gt -1)
        $Excel.Quit()
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Excel)} While ($x -gt -1)
    # Specify paths to spreadsheet and log file.
    $Script:Errors = 0
    $Step = "1"
    $ExcelPath = "c:\scripts\UpdateUsers.xls"
    $LogFile = "c:\scripts\UpdateUsers.log"
    Write-Host "Please Standby..."
    # Add to the log file.
    $Step = "2"
    Add-Content -Path $LogFile -Value "------------------------------------------------" -ErrorAction Stop
    Add-Content -Path $LogFile -Value "UpdateUsers.ps1 Version 1.0 (September 12, 2011)"
    Add-Content -Path $LogFile -Value $("Started: " + (Get-Date).ToString())
    Add-Content -Path $LogFile -Value "Spreadsheet: $ExcelPath"
    Add-Content -Path $LogFile -Value "Log file: $LogFile"
    $Step = "3"
    # Open specified Excel spreadsheet.
    $Excel = New-Object -ComObject "Excel.Application"
    $Workbooks = $Excel.Workbooks
    $Step = "4"
    $Workbook = $Workbooks.Open($ExcelPath)
    $Worksheets = $Workbook.Worksheets
    $Sheet = $Worksheets.Item(1)
    $Range = $Sheet.UsedRange
    $Rows = $Range.Rows
    $Columns = $Range.Columns
    $Step = "5"
    # Hash table of attribute syntaxes.
    # The LDAP display names will be read from the spreadsheet.
    # The corresponding syntaxes will be read from the Schema container.
    $Attributes = @{}
    # Array of spreadsheet column headings.
    $Cols = @()
    $Step = "6"
    # Read attribute LDAP Display Names from the first row of the spreadsheet.
    $ID = 0
    For ($k = 1; $k -le $Columns.Count; $k = $k + 1)
        # Retrieve column heading, the lDAPDisplayName of an attribute.
        $Value = $Sheet.Cells.Item(1, $k).Text
        # Keep track of all column headings.
        $Cols += $Value
        # Skip duplicates in hash table.
        If ($Attributes.ContainsKey($Value) -eq $False)
            # Default is "NotFound", until found in the AD Schema.
            $Attributes.Add($Value, "NotFound")
        # Keep track of which column uniquely identifies users.
        If ($Value.ToLower() -eq "distinguishedname") {$ID = $k}
        If (($Value.ToLower() -eq "samaccountname") -and ($ID -eq 0)) {$ID = $k}
        # This script cannot be used to rename users.
        If ($value.ToLower() -eq "cn")
            Add-Content -Path $LogFile -Value "## This script cannot be used to rename users"
            Add-Content -Path $LogFile -Value "   Do not specify the cn attribute in the spreadsheet"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            CleanUp
            Return "Program aborted: cn attribute found in spreadsheet" `
                + "`nSee log file: $LogFile"
    $Step = "7"
    If ($ID -eq 0)
        Add-Content -Path $LogFile -Value "## No column found to identify users"
        Add-Content -Path $LogFile -Value "   One column must be distinguishedName or sAMAccountName"
        Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
        CleanUp
        Return "Program aborted: No column found in spreadsheet to identify users" `
            + "`nSee log file: $LogFile"
    # Create filter to query for attributes in the schema.
    $Attrs = $Attributes.Keys
    $Filter = "(&(objectCategory=AttributeSchema)(|"
    ForEach ($Attr In $Attrs)
        $Filter = $Filter + "(lDAPDisplayName=$Attr)"
    $Filter = $Filter + "))"
    $Step = "8"
    $RootDSE = [System.DirectoryServices.DirectoryEntry]([ADSI]"LDAP://RootDSE")
    $Domain = $RootDSE.Get("defaultNamingContext")
    $Schema = $RootDSE.Get("schemaNamingContext")
    $Step = "9"
    # Use the NameTranslate object.
    $objTrans = New-Object -comObject "NameTranslate"
    $objNT = $objTrans.GetType()
    # Initialize NameTranslate by locating the Global Catalog.
    $objNT.InvokeMember("Init", "InvokeMethod", $Null, $objTrans, (3, $Null))
    $Step = "10"
    # Retrieve NetBIOS name of the current domain.
    $objNT.InvokeMember("Set", "InvokeMethod", $Null, $objTrans, (1, "$Domain"))
    $NetBIOSDomain = $objNT.InvokeMember("Get", "InvokeMethod", $Null, $objTrans, 3)
    Add-Content -Path $LogFile -Value "NetBIOS name of domain: $NetBIOSDomain"
    $Step = "11"
    $Searcher = New-Object System.DirectoryServices.DirectorySearcher
    $Searcher.SearchRoot = [ADSI]"LDAP://$Schema"
    $Searcher.PageSize = 200
    $Searcher.SearchScope = "subtree"
    $Searcher.PropertiesToLoad.Add("lDAPDisplayName") > $Null
    $Searcher.PropertiesToLoad.Add("attributeSyntax") > $Null
    $Searcher.PropertiesToLoad.Add("isSingleValued") > $Null
    $Searcher.PropertiesToLoad.Add("systemFlags") > $Null
    # Filter on specified attributes.
    $Searcher.Filter = $Filter
    $Step = "12"
    # Query Active Directory.
    $Results = $Searcher.FindAll()
    # Enumerate recordset.
    ForEach ($Result In $Results)
        # Retrieve properties of attributes.
        $Name = $Result.Properties.Item("lDAPDisplayName")[0]
        $SysFlags = $Result.Properties.Item("systemFlags")[0]
        $SyntaxNum = $Result.Properties.Item("attributeSyntax")[0]
        $SingleValued = $Result.Properties.Item("isSingleValued")[0]
        # Only single-valued string attributes supported by this version of the program.
        Switch ($SyntaxNum)
            "2.5.5.12" {$Syntax = "String"}
            Default {$Syntax = "NotSupported"}
        If ($Name.ToLower() -eq "distinguishedname") {$Syntax = "DN"}
        If (($SysFlags -band 4) -ne 0)
            $Attributes[$Name] = "Constructed"
        Else
            If ($SingleValued -eq $True)
                $Attributes[$Name] = $Syntax
            Else
                $Attributes[$Name] = "NotSupported"
    $Step = "13"
    # Check if any attributes not found or have unsupported syntax.
    $Found = $True
    ForEach ($Attr In $Attrs)
        $Syntax = $Attributes[$Attr]
        If ($Syntax -eq "NotFound")
            Add-Content -Path $LogFile -Value "## Attribute $Attr not found in schema"
            "Attribute $Attr not found in schema"
            $Found = $False
        If ($Syntax -eq "NotSupported")
            Add-Content -Path $LogFile -Value "## Attribute $Attr has a syntax that is not supported"
            "Attribute $Attr has a syntax that is not supported"
            $Found = $False
        If ($Syntax -eq "Constructed")
            Add-Content -Path $LogFile -Value "## Attribute $Attr is operational, so is not supported"
            "Attribute $Attr is operational, so is not supported"
            $Found = $False
    $Step = "14"
    If ($Found -eq $False)
        Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
        CleanUp
        Return "Program aborted" `
            + "`nSee log file: $LogFile"
    # Read remaining rows of the spreadsheet, until the first blank value is found
    # in the column that identifies users.
    $Step = "15"
    $Script:Updated = 0
    $Script:Unchanged = 0
    $j = 2
    Do {
        # Retieve ID value for the user first.
        $Value = $Sheet.Cells.Item($J, $ID).Text
        $Found = $False
        $Step = "16"
        If ($Cols[$ID - 1] -eq "distinguishedname")
            # Any forward slash characters must be escaped.
            $DN = $Value.Replace("/", "\/")
            # Bind to the user object.
            # If user not found, $User.Name will be $Null.
            $User = [ADSI]"LDAP://$DN"
            If ($User.Name -ne $Null)
                $Found = $True
        $Step = "17"
        If ($Cols[$ID - 1] -eq "samaccountname")
            Trap
                Write-Host ""
                "Error translating name: $_"
                Add-Content -Path $LogFile -Value "## Error translating name $Value"
                Add-Content -Path $LogFile -Value "   Description: $_"
                $Script:Errors = $Script:Errors + 1
                Continue
            # Convert sAMAccountName to distinguishedName.
            $DN = ""
            $Step = "18"
            $objNT.InvokeMember("Set", "InvokeMethod", $Null, $objTrans, (3, "$NetBIOSDomain$Value"))
            $DN = $objNT.InvokeMember("Get", "InvokeMethod", $Null, $objTrans, 1)
            $Step = "19"
            If ($DN -ne "")
                $Step = "20"
                # Any forward slash characters must be escaped.
                $DN = $DN.Replace("/", "\/")
                # Bind to the user object.
                $User = [ADSI]"LDAP://$DN"
                $Found = $True
        If ($Found -eq $True)
            $Step = "21"
            # Read remaining values for this user.
            $Changed = $False
            For ($k = 1; $k -le $Columns.Count; $k = $k + 1)
                # Skip the identifying column.
                If ($k -ne $ID)
                    $Step = "22"
                    # Retrieve attribute name for this column from array.
                    $AttrName = $Cols[$k - 1]
                    # Retrieve attribute syntax from hash table.
                    $Syntax = $Attributes[$AttrName]
                    $Step = "23"
                    # Retrieve attribute value for this user.
                    $Value = $Sheet.Cells.Item($j, $k).Text
                    # Skip blank values.
                    If ($Value -ne "")
                        If ($Syntax -eq "String")
                            Trap
                                If ("$_".StartsWith("The directory property cannot be found"))
                                    Continue
                                Else
                                    Write-Host ""
                                    "Error retrieving value from Active Directory: $_"
                                    Add-Content -Path $LogFile -Value "## Error retrieving $AttrName for user $DN"
                                    Add-Content -Path $LogFile -Value "   Description: $_"
                                    $Script:Errors = $Script:Errors + 1
                                    Continue
                            $Step = "24"
                            # Single-valued string attribute.
                            # Retrieve existing value.
                            $OldValue = ""
                            $OldValue = $User.Get($AttrName)
                            # Check if existing value to be deleted.
                            If ($Value.ToLower() -eq ".delete")
                                If ($OldValue -ne "")
                                    If ($AttrName.ToLower -eq "samaccountname")
                                        Add-Content -Path $LogFile -Value `
                                            "## Mandatory attribute sAMAccountName cannot be cleared for user: $DN"
                                        $Script:Errors = $Script:Errors + 1
                                    Else
                                        Trap
                                            Write-Host ""
                                            "Error deleting value from Active Directory: $_"
                                            Add-Content -Path $LogFile -Value "## Error deleting $AttrName for user $DN"
                                            Add-Content -Path $LogFile -Value "   Description: $_"
                                            $Script:Errors = $Script:Errors + 1
                                            Continue
                                        $Step = "25"
                                        # Make the attribute value "not set".
                                        $User.PutEx(1, $AttrName, 0)
                                        $Changed = $True
                            Else
                                $Step = "26"
                                # Check if new value from spreadsheet different.
                                If ($Value -ne $OldValue)
                                    Trap
                                        Write-Host ""
                                        "Error assigning value from Active Directory: $_"
                                        Add-Content -Path $LogFile -Value "## Error assigning $AttrName for user $DN"
                                        Add-Content -Path $LogFile -Value "   Description: $_"
                                        $Script:Errors = $Script:Errors + 1
                                        Continue
                                    # Assign the new value to the attribute.
                                    $User.Put($AttrName, $Value)
                                    $Changed = $True
                        Else
                            # Unexpected error.
                            Add-Content -Path $LogFile -Value `
                                "## Unexpected syntax: $Syntax for attribute $AttrName for user $DN"
                            $Script:Errors = $Script:Errors + 1
            If ($Changed -eq $True)
                Trap
                    Write-Host ""
                    "Error saving to Active Directory: $_"
                    Add-Content -Path $LogFile -Value "## Error saving to AD for user $DN"
                    Add-Content -Path $LogFile -Value "   Description: $_"
                    $Script:Errors = $Script:Errors + 1
                    $Script:Updated = $Script:Updated - 1
                    Continue
                $User.SetInfo()
                Add-Content -Path $LogFile -Value "Update user: $DN"
                Write-Host "." -NoNewLine
                $Script:Updated = $Script:Updated + 1
            Else
                Add-Content -Path $LogFile -Value "User unchanged: $DN"
                Write-Host "." -NoNewLine
                $Script:Unchanged = $Script:Unchanged + 1
        Else
            Add-Content -Path $LogFile -Value "## User not found: $Value"
            Write-Host "." -NoNewLine
            $Script:Errors = $Script:Errors + 1
        $j = $J + 1
    } Until ($Sheet.Cells.Item($j, $ID).Text -eq "")
    $Step = "27"
    CleanUp
    Add-Content -Path $LogFile -Value $("Finished: " + (Get-Date).ToString())
    Add-Content -Path $LogFile -Value "Number of users updated: $Script:Updated"
    Add-Content -Path $LogFile -Value "Number of users unchanged: $Script:Unchanged"
    Add-Content -Path $LogFile -Value "Number of errors: $Script:Errors"
    Write-Host ""
    "Done"
    "Number of errors: $Script:Errors"
    "See log file: $LogFile"

    Actually scripts run fine with excel file, currently we are using user-id to pick to update AD. Now we want to update AD use employee id. You can say to identify the record in AD through employee ID instead of user-id. 
    I do not think you will get anyone here to fix that for you.  You need to find someone who knows PowerShell to help you or learn PowerShell your self.
    I would fix it for you but not for free.  It is too oddly designed and has too many dependencies.  Any small change is likely to break it.
    ¯\_(ツ)_/¯

  • Sharepoint portal goes down Whenever a specific user logs into the portal

    hi All,
    Sharepoint portal goes down Whenever a specific user logs into the portal
    When a specific user logs into the portal , the iis goes down and no one able to access the portal.
    once we reset  iis then portal works fine .Please help us to identify the root cause for this issue.

    What is the error message it throws for everyone after that user user logged into the site. Did you encountered the same behavior for the other web application in the same farm as well?
    It would be worth to check health of that particular application pool and the account used for it during the time you face the issue.
    Veeramani.S

  • RE: Force user to re-login if the application is idle for awhile!

    Hi,
    I a similar thing a little while ago for an application written in a 4gl (not Forte) running
    windows 95 clients. I ended up dropping out to "C" and using the SDK to install
    hooks which monitored certain mouse and keyboard events to the application.
    It ended up being less than 10 lines of code in the end whereas when I tried
    to do it within the 4gl it was looked like wholesale changes to lots of code.
    This option fell down when the user was reading their help file or updating
    a word document so we added a pop-up which came up at the front of all applications
    on the PC giving the user a further minute to respond so as not to annoy the genuine
    user who was still "there" but doing something else.
    I have not had the chance to try this in Forte yet but it should be possible.
    If you think this might be an option for you I will try and cobble together an
    example.
    Dalton
    ===============================================================
    Dalton Cranston 45 Castle St.,
    GO5 Ltd Reading. RG1 7SN
    E-mail: [email protected] United Kingdom
    URL: www.go5.com Phone: +44 (0)1189 589 555
    Fax: +44 (0)1189 587 467
    -----Original Message-----
    From: Lu Wang X1 [SMTP:[email protected]]
    Sent: 13 February 1998 17:45
    To: [email protected]
    Subject: Force user to re-login if the application is idle for a while!
    Hi;
    For some security reasons, it requires our Forte application to force user to
    re-log into the application if the user doesn't use this application for 10
    minutes. The problem and difficulty to us is that how to determine there is no
    activity going on for this application on the client's PC.
    Any thought and ideas will be greatly appreciated!
    Lu Wang
    Eli Lilly and Company
    [email protected]
    (317)276-5776

    Hi Rick,
    Thanks for the Reply.
    When they are doing some action with RF id system gave DUMP - ITS_TEMPLATE_NOT_FOUND.
    With this is there any efect on Table locking.
    We got the dump on the ITS screen where as at the same time in back end ECC system TABLE data is using.
    Thanks
    Naresh

  • Is it possible to identify the user?

    Hi,
    I know that I can check identity.name to see who the user is. But it seems that this property is only available during console, batch, menu and app initialization events.
    I have a date that is supposed to auto fill if it is blank. I want it to work on every machine except one, and I want the form to identify the user and if that user is a specific user, the date doesn't auto populate.
    If the identity object won't work, can anyone think of another way?
    Thanks.

    As documented in Adobe's Acrobat JavaScripting Manual, there are security restrictions with respect to the "identity" object. Those restrictions prevent one from directly accessing the "identity" object from a form field. You can access the properties from a folder level JavaScript. The following script when placed in Acrobat's application JavaScript folder will create and initialize application level variables that be accessed by any PDF opened by Acrobat:
    // Folder level script to create an application level variables for the "identity" objects properties
    var Identity = new Array();
    Identity.Corporation = identity.corporation;
    Identity.Email = identity.email;
    Identity.LoginName = identity.loginName;
    Identity.LoginName = identity.loginName;
    Identity.Name = identity.name;
    One can then add the following document level or field level javaScript to initialize fields within the PDF to the value of the application level variables:
    this.getField("loginName").value = Identity.LoginName;
    this.getField("name").value = Identity.Name;
    this.getField("by").value = "By: ";
    this.getField("by").value += Identity.Name;
    With version 7.0 or above, you can use a trusted function located as a document level script to retrieve the information:
    trustedIdentity = app.trustedFunction( function (sProperty) {
    var iProperty = "";
    app.beginPriv(); // explicitly raise privilege
    iProperty = identity[sProperty];
    app.endPriv();
    return iProperty;
    One can then add the following document level or field level javaScript to initialize fields within the PDF to the value of the application level variables:
    this.getField("loginName").value = trustedIdentity("loginName");
    this.getField("name").value = trustedIdentity("name");
    this.getField("by").value = "By: ";
    this.getField("by").value += trustedIdentity("name");

Maybe you are looking for

  • Calling a Swing class method from from another swing class method

    Hi guys, I'm desperate for help or a pointing in the right direction. Basically, I want to call the public void createUI method in class AddressUI in the public void createUI method of PartnerUI class. Is that legal? How do I go about it? Thanks. pac

  • Balance difference in FS10N

    Hello, We are having a strange issue. When we execute transaction FS10N for a particular account the balance it is showing is 48,267.60. But when we drill down to see the line items it shows a different balance 42,886.76. Can anyone let me know the i

  • Can Purchase requisition carry on prices to PO?

    Hi gurus, I have automatically created Purchase Requisition from sales order. I want this Purchase Requisition to carry the prices to the Purchase orders. Is this possible? Can I make a PO referencing the PR and have the prices I put in the sales ord

  • Temporary focus for a popup?

    Hi, this is NOT URGENT, just a little brain teaser I have come upon myself. I have a calendar-like component that I want to display on a popup. The user may open it (with a button) and choose something with the mouse (which hides the popup and fires

  • How to write Functional Spec s for Duplicate and Postal Check for ELM

    Hi Guru s Can any one guide me how to write functional specifications for Duplicate Check and postal Check for ELM kindly share information on this. Thanks & Regards, Prasanna