10 Replies Latest reply on Mar 7, 2018 2:04 PM by AnthonyDowns

    Undelete a user

    blwallace Apprentice

      My organization is moving from Service Desk to Service Manager and I'm completely new to SM (so, be kind).  Currently, I'm playing with SM in my lab.  I have imported users from AD using LDAP import, but even though my employee record shows an organization unit of Information Technology...

      when I look at List View, that same employee record shows Default in the org unit column

       

      Trying to figure out why this is (if you know, please chime in here) and doing different things in my LDAP import, I decided to delete the user; thinking re-running the import would recreate the user.  In Service Desk, the user was soft deleted and the way to recover the user was to modify the SQL record.  Wondering if this is the case in Service Manager as well - and if so, what table holds the soft-delete value?

        • 1. Re: Undelete a user
          AnthonyDowns Specialist

          How is the org unit set in your LDAP settings? Because its a related field you have to use the link to set it, instead of the fields at the top.

           

          You can use the Contact Relationships at the bottom here to set link fields. i.e. (Org Unit, Manager)

           

          1 of 1 people found this helpful
          • 2. Re: Undelete a user
            blwallace Apprentice

            Here are my settings...

            I'm not sure I totally understand the "Use Default" settings.  I think I have it set correctly.  My understanding is if it doesn't find a value in the LDAP department, then the OU to be created (linked) for the user should be 'MSRS'.  Is that correct?  If so, it's not filling in 'MSRS' for users without a department.

             

            After more testing, I've deleted a user and when the new import happens, it pulls in the OU correctly.  However, for an existing account, the OU/department field doesn't update.  It only shows properly after the user is deleted and re-created. 

             

            I've also discovered there must be a timer on a user being re-created by importing.  When I delete a user, then run another LDAP import, the user isn't created.  After some time, I can run another import and the user IS created.  I'm still trying to figure out the length of time.  It's happened twice for two different users.  My lab equipment isn't the fastest, so I'm wondering if this is real or not.  Any comments on this?

            • 3. Re: Undelete a user
              AnthonyDowns Specialist

              The "Use Default" only works if the LDAP field name is not found or text expression is selected I believe. I would need to test this but this i think this is what's happening. The department is a valid field, it returns the value, which would be an empty string.

               

              Maybe something like this would work.

               

              It should update existing accounts as well. On this first page, there is a checkbox for incremental updates, turn this off and try the sync again, this should force an update to all accounts. I think this checkbox stores the USN for AD accounts and only updates records if the counter has been incremented in AD.

              1 of 1 people found this helpful
              • 4. Re: Undelete a user
                blwallace Apprentice

                Anthony,

                 

                So if the LDAP field name is valid, and 'department' is a valid LDAP field, then 'Use Default' is not really needed.

                 

                I'll test the Enable Incremental Updates.

                 

                Before making any changes, I ran the Sync again and my user that I deleted, is not imported.  At 9:55 I imported the user 'jeff'.  I deleted that account and ran imports.  Finally at 11:08, it imported 'jeff'.  It appears there is some internal timer going on - perhaps an hour.

                • 5. Re: Undelete a user
                  blwallace Apprentice

                  I can confirm deleting a user, unchecking Enable Incremental Updates, run import, the user is created immediately.

                   

                  Still my existing users OrgUnit field is not updated/changed.

                  • 6. Re: Undelete a user
                    AnthonyDowns Specialist

                    I just tested this expression and it worked. If AD department is empty MSRS is used if not department is used.

                     

                    If you change the LDAP field name to expression and paste this it should work. You can probably remove the OR department == "" i just put it there just in case. If the department is empty it seems to returns null and not an empty string.

                     

                    $(if IsNull(department) || department == "" then "MSRS" else department)

                    1 of 1 people found this helpful
                    • 7. Re: Undelete a user
                      blwallace Apprentice

                      Thanks for the help.  That is what I'm looking for.  I'll need to explore expressions more.

                       

                      I still don't understand why the 'List View' doesn't update when the information in the user record does.  If I delete the user, and re-import, the List View is correct.

                      • 8. Re: Undelete a user
                        AnthonyDowns Specialist

                        That is odd if the employee record is correct than the list view should be too, assuming the field hasn't been changed. Do you have the list view open while the import is running? If so, you should be able to refresh and have it display correctly.

                         

                        The only other thing I could think of would be the incorrect field on the list view but if it works on reimport that wouldn't make sense.

                        • 9. Re: Undelete a user
                          blwallace Apprentice

                          How do I find the list view configuration you show?

                          • 10. Re: Undelete a user
                            AnthonyDowns Specialist

                            Go to Business Objects, then Employee -> Layouts -> Profile.Employee. This is the layout for the admin role.

                            Then click grid view

                            This shows the list being used for your role. Which should be Profile.Emplyee

                            Now you can go back to the Employee BO -> List