Skip to main content
All CollectionsBuild AutomationsWorkflowsUse Cases
Automate Lost or Stolen Device Management with Torq
Automate Lost or Stolen Device Management with Torq

Learn how to use Torq to secure team member's devices when misplaced.

Updated over 2 months ago

Should an employee lose a phone or work computer, sensitive workplace information must be wiped clean from the vulnerable device. Follow the steps below in order to log them out of sensitive workspaces and change sensitive information so that no one can access workplace data. This can also be utilized or modified to act as an offboarding workflow.

  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.

  2. Use a Get Employee step with the triggering employee email, according to whichever HR system your organization uses:

    • Hibob

    • BambooHR

    • Or use a custom HTTP step and the API of your organization's HR system.

  3. Ask the employee what device was lost: a mobile phone or a computer.

  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}}

  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.

  8. If a lost mobile device:

    1. Optionally send messages through your communication channel 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 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.

    3. If the mobile device is a company phone, or the employee was logged into company resources on their personal phone, follow step 10.

  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.

  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 }}/signOut
    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.

Did this answer your question?