Lost or stolen device
  • 20 Feb 2024
  • 3 Minutes to read
  • Dark
    Light

Lost or stolen device

  • Dark
    Light

Article Summary

Follow this tutorial to create an initial workflow for when an employee loses a phone or work computer, to log them out of sensitive workspaces and change sensitive information. 

  1. Create a workflow using a trigger such as Slack Slash Commands or Discord Slash Commands that will trigger upon a slash command such as /lostdevice or /missingdevice. 
    1. Optionally, alert the Slack, Discord, or Microsoft IT channel, the CISO, or the IT manager that the workflow has been initiated using the appropriate vendor's Send Message step.lostdevice parallel reset password messages 
  2. Use a Get Employee step with the triggering employee email, according to whichever HR system your organization uses: 
  3. Ask the employee what kind of device was lost: a mobile phone or a computer. lostdevice slack as a question
  4. Gather all JumpCloud user details, to match them most efficiently to the appropriate email and device. The following group of steps can be turned into a nested workflow to enable maximum efficiency: 
    1. Variable > Set Variable 
      1. Name: Data
      2. Data type: Number
      3. Value number: 0
    2. Operator > Loop 
      1. Type: Range
      2. Start: 1
      3. End: 100
    3. Jumpcloud > List Users
      1. Offset: {{ $.set_variable.data}}
    4. Operator > If
      1. {{ $.list_users.api_object.results }} = Not Empty
      2. False: Operator > Break loop
      3. True: Continue 
    5. Operator > Collect 
      1. Input: {{ $.list_users.api_object.results }}
    6. Math utils > Solve Equation
      1. Input: {{ $.set_variable.data }}+100
    7. Variable > Set Variable
      1. Name: Data
      2. Data type: Number
      3. Value number: {{ $.solve_equation.result }}
    8. Outside of the loop, place an Operator > Exit step
      1. Workflow Output: {{$.collect_1.result}}lostdevice jumpcloud nested
  5. Parallel loop through {{ $.list_all_jumpcloud_users.output }}
    1. Inside the loop, put two If operators. 
    2. In the first If, collect the {{ $.loop_value }} if {{ $.loop_value.displayname }} equals the {{ $.get_full_details_of_employee.api_object.displayName }}
    3. In the second If, collect the {{ $.loop_value }} if {{ $.loop_value.displayname }} equals the {{ $.get_full_details_of_employee.api_object.work.manager }}
  6. Optionally, use Slack, Teams, Discord, Zoom, or whatever chat message service you want to send messages to the employee's manager, the company CISO, and the IT manager to notify them of the lost device. 
  7. Using a Switch operator, create two scenarios: one for a lost mobile device, and one for a lost company laptop. Add whichever other Switch branches apply to your company.lostdevice switch mobile computer
  8. If a lost mobile device: 
    1. Optionally send messages through your communication channel of choice to the CISO & head of IT.
    2. Reply to the user who initiated the lost device a message such as:
      1. *It is recommended that you will take the following actions:*
        -- Contact your cellular company to block your sim.
        -- Reset your passwords for your cloud services: email, PayPal, Bank account, and any social network you use.
        -- Cancel any credit card assigned to your mobile device's wallet.
  9. If a lost company laptop:
    1. Use the JumpCloud step List systems associated with user to find all the employee's devices. 
    2. Optionally, send the list of devices to your CISO and IT manager.  lostdevice jumpcloud list systems
  10. For both lost items, add the following steps to log out users and change the passwords:
    1. Google Workspace: Generate a bearer token step to create a token to use Google suite steps. 
    2. Google Workspace: Get user details to get the details of the user who triggered the workflow.
    3. Using an HTTP Step force sign out the user from Google accounts with this POST request: https://admin.googleapis.com/admin/directory/v1/users/{{$.get_user_details.api_object.id }}/signOutlostdevice sign out user email(1)
    4. Cryptographic Utils: Generate random password with a suggested length of 14. 
    5. Using an HTTP step reset the Jumpcloud user password with this PUT request: https://console.jumpcloud.com/api/systemusers/{{$.employee.result.0._id }}.
    6. Use an If operator for if the password reset fails. 
      1. For failure, add a message step to the IT manager. 
      2. If the password reset works, send a message to the employee's alternative email with the new password information, and instruct them to reset the password once logged in.lostdevice new password email



Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.