savagegus
11/27/2017 - 6:40 PM

Check Jumpcloud Users for MFA

Uses the Jumpcloud v1 api to pull all users and check if MFA is enabled.

#!/bin/bash

API_KEY=$1

curl \
  -sq \
  -H 'Accept:  application/json'\
  -H 'Content-Type: application/json'\
  -H "x-api-key: ${API_KEY}"\
  "https://console.jumpcloud.com/api/systemusers/?limit=50" \
  | jq -r '.results[] | "\(.email)\t \(.enable_user_portal_multifactor)"' \
  | grep false