{
  "trigger_url": "https://api.runscope.com/radar/1d93f531-7fd3-4416-82aa-b22b731b3f9f/trigger", 
  "name": "Okta SCIM 1.1 CRUD Test", 
  "version": "1.0", 
  "exported_at": 1542199107, 
  "steps": [
    {
      "skipped": false, 
      "url": "{{oktaOrgUrl}}/api/v1/apps/{{oktaAppId}}", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Check SCIM Apps instance in Okta ", 
      "headers": {
        "Content-Type": [
          "application/json"
        ], 
        "Accept": [
          "application/json"
        ], 
        "Authorization": [
          "SSWS {{oktaToken}}"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "body": "{\r\n  \"profile\": {\r\n    \"firstName\": \"{{okta_user_firstname}}\",\r\n    \"lastName\": \"{{okta_user_lastname}}\",\r\n    \"email\": \"{{okta_user_email}}\",\r\n    \"login\": \"{{okta_user_email}}\",\r\n    \"title\": \"{{okta_user_title}}\",\r\n    \"primaryPhone\": \"{{okta_user_primaryphone}}\"\r\n  },\r\n  \"credentials\": {\r\n    \"password\": {\"value\": \"Kv7J2LEa\"},\r\n    \"recovery_question\": {\r\n      \"question\": \"Who's a major player in the cowboy scene?\",\r\n      \"answer\": \"okta\"\r\n    }\r\n  }\r\n}", 
      "skipped": false, 
      "form": {}, 
      "url": "{{oktaOrgUrl}}/api/v1/users?activate=true", 
      "variables": [
        {
          "source": "response_json", 
          "property": "id", 
          "name": "okta_add_userid"
        }
      ], 
      "multipart_form": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Add new random user to Okta", 
      "headers": {
        "Content-Type": [
          "application/json"
        ], 
        "Authorization": [
          "SSWS {{oktaToken}}"
        ], 
        "Accept": [
          "application/json"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "POST"
    }, 
    {
      "body": "{\r\n  \"id\": \"{{okta_add_userid}}\",\r\n  \"scope\": \"USER\",\r\n  \"credentials\": {\r\n    \"userName\": \"{{okta_user_email}}\"\r\n  },\r\n  \"profile\": {\r\n      \"familyName\": \"{{okta_user_lastname}}\",\r\n      \"givenName\": \"{{okta_user_firstname}}\",\r\n      \"emailType\": \"work\",\r\n      \"email\": \"{{okta_user_email}}\"\r\n  }\r\n}\r\n", 
      "skipped": false, 
      "form": {}, 
      "url": "{{oktaOrgUrl}}/api/v1/apps/{{oktaAppId}}/users", 
      "variables": [], 
      "multipart_form": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Assign user to SCIM App", 
      "headers": {
        "Content-Type": [
          "application/json"
        ], 
        "Authorization": [
          "SSWS {{oktaToken}}"
        ], 
        "Accept": [
          "application/json"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "POST"
    }, 
    {
      "duration": 40, 
      "skipped": false, 
      "step_type": "pause"
    }, 
    {
      "skipped": false, 
      "url": "{{SCIMUrl}}/Users?filter=userName eq \"{{okta_user_email}}\"", 
      "variables": [
        {
          "source": "response_json", 
          "property": "Resources[0].id", 
          "name": "scim_id"
        }
      ], 
      "multipart_form": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Verify if user is created in SCIM App", 
      "headers": {
        "Accept": [
          "application/scim+json"
        ], 
        "Authorization": [
          "{{SCIMAuth}}"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "equal", 
          "property": "Resources[0].userName", 
          "value": "{{okta_user_email}}", 
          "source": "response_json"
        }, 
        {
          "comparison": "equal", 
          "property": "Resources[0].emails[0].value", 
          "value": "{{okta_user_email}}", 
          "source": "response_json"
        }, 
        {
          "comparison": "equal", 
          "property": "Resources[0].name.familyName", 
          "value": "{{okta_user_lastname}}", 
          "source": "response_json"
        }, 
        {
          "comparison": "equal", 
          "property": "Resources[0].name.givenName", 
          "value": "{{okta_user_firstname}}", 
          "source": "response_json"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "body": "{\r\n  \"profile\": {\r\n    \"firstName\": \"{{okta_user_firstname_update}}\",\r\n    \"lastName\": \"{{okta_user_lastname}}\",\r\n    \"email\": \"{{okta_user_email}}\",\r\n    \"login\": \"{{okta_user_email}}\"\r\n  }\r\n}", 
      "skipped": false, 
      "form": {}, 
      "url": "{{oktaOrgUrl}}/api/v1/users/{{okta_add_userid}}", 
      "variables": [], 
      "multipart_form": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Update user firstname", 
      "headers": {
        "Content-Type": [
          "application/json"
        ], 
        "Accept": [
          "application/json"
        ], 
        "Authorization": [
          "SSWS {{oktaToken}}"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "PUT"
    }, 
    {
      "duration": 40, 
      "skipped": false, 
      "step_type": "pause"
    }, 
    {
      "skipped": false, 
      "url": "{{SCIMUrl}}/Users/{{scim_id}}", 
      "variables": [], 
      "multipart_form": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Verify firstname update in SCIM App", 
      "headers": {
        "Accept": [
          "application/scim+json"
        ], 
        "Authorization": [
          "{{SCIMAuth}}"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "equal", 
          "property": "name.givenName", 
          "value": "{{okta_user_firstname_update}}", 
          "source": "response_json"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "body": "", 
      "skipped": false, 
      "form": {}, 
      "url": "{{oktaOrgUrl}}/api/v1/users/{{okta_add_userid}}/lifecycle/deactivate", 
      "variables": [], 
      "multipart_form": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Deactivate user in Okta", 
      "headers": {
        "Content-Type": [
          "application/json"
        ], 
        "Authorization": [
          "SSWS {{oktaToken}}"
        ], 
        "Accept": [
          "application/json"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "POST"
    }, 
    {
      "duration": 40, 
      "skipped": false, 
      "step_type": "pause"
    }, 
    {
      "skipped": false, 
      "url": "{{SCIMUrl}}/Users/{{scim_id}}", 
      "variables": [], 
      "multipart_form": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Verify if user is deactivated in SCIM App", 
      "headers": {
        "Accept": [
          "application/scim+json"
        ], 
        "Authorization": [
          "{{SCIMAuth}}"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "equal", 
          "property": "active", 
          "value": "false", 
          "source": "response_json"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "body": "", 
      "skipped": false, 
      "form": {}, 
      "url": "{{oktaOrgUrl}}/api/v1/users/{{okta_add_userid}}/lifecycle/activate", 
      "variables": [], 
      "multipart_form": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Reactivate user in okta", 
      "headers": {
        "Content-Type": [
          "application/json"
        ], 
        "Accept": [
          "application/json"
        ], 
        "Authorization": [
          "SSWS {{oktaToken}}"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "POST"
    }, 
    {
      "duration": 40, 
      "skipped": false, 
      "step_type": "pause"
    }, 
    {
      "body": "{\r\n  \"id\": \"{{okta_add_userid}}\",\r\n  \"scope\": \"USER\",\r\n  \"credentials\": {\r\n    \"userName\": \"{{okta_user_email}}\"\r\n  },\r\n  \"profile\": {\r\n      \"familyName\": \"{{okta_user_lastname}}\",\r\n      \"givenName\": \"{{okta_user_firstname_update}}\",\r\n      \"emailType\": \"work\",\r\n      \"email\": \"{{okta_user_email}}\"\r\n  }\r\n}\r\n", 
      "skipped": false, 
      "form": {}, 
      "url": "{{oktaOrgUrl}}/api/v1/apps/{{oktaAppId}}/users", 
      "variables": [], 
      "multipart_form": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Assign user to SCIM App", 
      "headers": {
        "Content-Type": [
          "application/json"
        ], 
        "Accept": [
          "application/json"
        ], 
        "Authorization": [
          "SSWS {{oktaToken}}"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "POST"
    }, 
    {
      "duration": 40, 
      "skipped": false, 
      "step_type": "pause"
    }, 
    {
      "skipped": false, 
      "url": "{{SCIMUrl}}/Users/{{scim_id}}", 
      "variables": [
        {
          "source": "response_json", 
          "property": "", 
          "name": null
        }
      ], 
      "multipart_form": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Verify if user is reactivated in SCIM App", 
      "headers": {
        "Authorization": [
          "{{SCIMAuth}}"
        ], 
        "Accept": [
          "application/scim+json"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "equal", 
          "property": "active", 
          "value": "true", 
          "source": "response_json"
        }
      ], 
      "scripts": [
        ""
      ], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "duration": 40, 
      "skipped": false, 
      "step_type": "pause"
    }, 
    {
      "body": "", 
      "skipped": false, 
      "form": {}, 
      "url": "{{oktaOrgUrl}}/api/v1/apps/{{oktaAppId}}/users/{{okta_add_userid}}", 
      "variables": [], 
      "multipart_form": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Removes an assignment for a user in Okta", 
      "headers": {
        "Content-Type": [
          "application/json"
        ], 
        "Authorization": [
          "SSWS {{oktaToken}}"
        ], 
        "Accept": [
          "application/json"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": "204", 
          "source": "response_status"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "DELETE"
    }, 
    {
      "duration": 40, 
      "skipped": false, 
      "step_type": "pause"
    }, 
    {
      "skipped": false, 
      "url": "{{SCIMUrl}}/Users/{{scim_id}}", 
      "variables": [], 
      "multipart_form": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Verify if user is deactivated in SCIM App", 
      "headers": {
        "Authorization": [
          "{{SCIMAuth}}"
        ], 
        "Accept": [
          "application/scim+json"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "equal", 
          "property": "active", 
          "value": "false", 
          "source": "response_json"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }
  ], 
  "description": "Basic User Management tests to see if your SCIM server will work with Okta"
}