{
  "trigger_url": "https://api.runscope.com/radar/7c61be76-0b83-4e69-9240-be91c62642c0/trigger", 
  "name": "Okta SCIM 1.1 SPEC Test", 
  "version": "1.0", 
  "exported_at": 1478558963, 
  "steps": [
    {
      "url": "{{SCIMBaseURL}}/ServiceProviderConfigs", 
      "variables": [], 
      "args": {}, 
      "step_type": "request", 
      "auth": {}, 
      "note": "Optional Test: Test ServiceProviderConfig endpoint", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/scim+json; charset=utf-8"
        ], 
        "Authorization": "{{auth}}", 
        "Accept": [
          "application/json"
        ], 
        "User-Agent": [
          "OKTA SCIM Integration"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "not_empty", 
          "property": "schemas", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "has_value", 
          "property": "schemas", 
          "value": "urn:scim:schemas:core:1.0", 
          "source": "response_json"
        }, 
        {
          "comparison": "is_less_than", 
          "value": "400", 
          "source": "response_time"
        }, 
        {
          "comparison": "not_empty", 
          "property": "patch", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "bulk", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "filter", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "changePassword", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "sort", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "etag", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "authenticationSchemes", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "authenticationSchemes[0].type", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "authenticationSchemes[0].description", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "etag.supported", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "sort.supported", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "changePassword.supported", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "filter.maxResults", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "filter.supported", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "bulk.supported", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "bulk.maxOperations", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "bulk.maxPayloadSize", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "patch.supported", 
          "value": null, 
          "source": "response_json"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "data": "", 
      "method": "GET"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "body": "test", 
      "form": {}, 
      "url": "{{SCIMBaseURL}}/ServiceProviderConfigs", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Optional Test: Check if ServiceProviderConfig is read-only", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/json; charset=utf-8"
        ], 
        "Accept": [
          "application/json"
        ], 
        "Authorization": "{{auth}}"
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": "405", 
          "source": "response_status"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "POST"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "url": "{{SCIMBaseURL}}/ResourceTypes", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Optional Test: Check ResourceTypes endpoint", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/json; charset=utf-8"
        ], 
        "Accept": [
          "application/json"
        ], 
        "Authorization": "{{auth}}", 
        "User-Agent": [
          "OKTA SCIM Integration"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "has_value", 
          "property": "schemas", 
          "value": "urn:scim:schemas:core:1.0", 
          "source": "response_json"
        }, 
        {
          "comparison": "is_less_than", 
          "value": "400", 
          "source": "response_time"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources[0].name", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources[0].endpoint", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources[0].schema", 
          "value": null, 
          "source": "response_json"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "body": "test", 
      "form": {}, 
      "url": "{{SCIMBaseURL}}/ResourceTypes", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Optional Test: Check if ResourceTypes is read-only", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/json; charset=utf-8"
        ], 
        "Accept": [
          "application/json"
        ], 
        "Authorization": "{{auth}}", 
        "User-Agent": [
          "OKTA SCIM Integration"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": "405", 
          "source": "response_status"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "POST"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "url": "{{SCIMBaseURL}}/Schemas", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Optional Test: Check Schemas endpoint", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/json; charset=utf-8"
        ], 
        "Accept": [
          "application/json"
        ], 
        "Authorization": "{{auth}}", 
        "User-Agent": [
          "OKTA SCIM Integration"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "has_value", 
          "property": "schemas", 
          "value": "urn:scim:schemas:core:1.0:ListResponse", 
          "source": "response_json"
        }, 
        {
          "comparison": "is_less_than", 
          "value": "400", 
          "source": "response_time"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources[0].id", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources[0].attributes", 
          "value": null, 
          "source": "response_json"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "body": "", 
      "form": {}, 
      "url": "{{SCIMBaseURL}}/Schemas", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Optional Test: Check if Schemas is read-only", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/json; charset=utf-8"
        ], 
        "Accept": [
          "application/json"
        ], 
        "Authorization": "{{auth}}", 
        "User-Agent": [
          "OKTA SCIM Integration"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": "405", 
          "source": "response_status"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "POST"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "url": "{{SCIMBaseURL}}/Users?count=1&startIndex=1", 
      "variables": [
        {
          "source": "response_json", 
          "property": "Resources[0].id", 
          "name": "ISVUserid"
        }
      ], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Required Test: Test Users endpoint", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/json; charset=utf-8"
        ], 
        "Accept": [
          "application/json"
        ], 
        "Authorization": "{{auth}}", 
        "User-Agent": [
          "OKTA SCIM Integration"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "has_value", 
          "property": "schemas", 
          "value": "urn:scim:schemas:core:1.0", 
          "source": "response_json"
        }, 
        {
          "comparison": "is_a_number", 
          "property": "itemsPerPage", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "is_a_number", 
          "property": "startIndex", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "is_a_number", 
          "property": "totalResults", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "is_less_than", 
          "value": "600", 
          "source": "response_time"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources[0].id", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources[0].name.familyName", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources[0].name.givenName", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources[0].userName", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources[0].active", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "Resources[0].emails[0].value", 
          "value": null, 
          "source": "response_json"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "url": "{{SCIMBaseURL}}/Users/{{ISVUserid}}", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Required Test: Get Users/{{id}} ", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/json; charset=utf-8"
        ], 
        "Accept": [
          "application/json"
        ], 
        "Authorization": "{{auth}}", 
        "User-Agent": [
          "OKTA SCIM Integration"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "is_less_than", 
          "value": "600", 
          "source": "response_time"
        }, 
        {
          "comparison": "not_empty", 
          "property": "id", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "name.familyName", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "name.givenName", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "userName", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "active", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "emails[0].value", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "equal", 
          "property": "id", 
          "value": "{{ISVUserid}}", 
          "source": "response_json"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "url": "{{SCIMBaseURL}}/Users?filter=userName eq \"{{InvalidUserEmail}}\"", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Required Test: Test invalid User by username", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/json; charset=utf-8"
        ], 
        "Accept": [
          "application/json"
        ], 
        "Authorization": "{{auth}}", 
        "User-Agent": [
          "OKTA SCIM Integration"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "has_value", 
          "property": "schemas", 
          "value": "urn:scim:schemas:core:1.0", 
          "source": "response_json"
        }, 
        {
          "comparison": "equal", 
          "property": "totalResults", 
          "value": "0", 
          "source": "response_json"
        }, 
        {
          "comparison": "is_less_than", 
          "value": "400", 
          "source": "response_time"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "url": "{{SCIMBaseURL}}/Users/{{UserIdThatDoesNotExist}}", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Required Test: Test invalid User by ID", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/json; charset=utf-8"
        ], 
        "Authorization": "{{auth}}", 
        "Accept": [
          "application/json"
        ], 
        "User-Agent": [
          "OKTA SCIM Integration"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": "404", 
          "source": "response_status"
        }, 
        {
          "comparison": "not_empty", 
          "property": "detail", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "is_less_than", 
          "value": "600", 
          "source": "response_time"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "url": "{{SCIMBaseURL}}/Users?filter=userName eq \"{{randomEmail}}\"", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Required Test: Make sure random user doesn't exist", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/json; charset=utf-8"
        ], 
        "Authorization": "{{auth}}", 
        "Accept": [
          "application/json"
        ], 
        "User-Agent": [
          "OKTA SCIM Integration"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "equal_number", 
          "property": "totalResults", 
          "value": "0", 
          "source": "response_json"
        }, 
        {
          "comparison": "has_value", 
          "property": "schemas", 
          "value": "urn:scim:schemas:core:1.0", 
          "source": "response_json"
        }, 
        {
          "comparison": "is_less_than", 
          "value": "600", 
          "source": "response_time"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "body": "{\"schemas\":[\"urn:scim:schemas:core:1.0\"],\"userName\":\"{{randomUsername}}\",\"name\":{\"givenName\":\"{{randomGivenName}}\",\"familyName\":\"{{randomFamilyName}}\"},\"emails\":[{\"primary\":true,\"value\":\"{{randomEmail}}\",\"type\":\"work\"}],\"displayName\":\"{{randomGivenName}} {{randomFamilyName}}\",\"active\":true}", 
      "form": {}, 
      "url": "{{SCIMBaseURL}}/Users", 
      "variables": [
        {
          "source": "response_json", 
          "property": "id", 
          "name": "idUserOne"
        }, 
        {
          "source": "response_json", 
          "property": "userName", 
          "name": "UserName"
        }
      ], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Required Test: Create Okta user with realisitic values", 
      "headers": {
        "Authorization": "{{auth}}",
        "Content-Type": [
          "application/json"
        ],
        "Accept": [
          "application/json; charset=utf-8"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": "201", 
          "source": "response_status"
        }, 
        {
          "comparison": "is_less_than", 
          "value": "600", 
          "source": "response_time"
        }, 
        {
          "comparison": "equal", 
          "property": "active", 
          "value": "true", 
          "source": "response_json"
        }, 
        {
          "comparison": "not_empty", 
          "property": "id", 
          "value": null, 
          "source": "response_json"
        }, 
        {
          "comparison": "equal", 
          "property": "name.familyName", 
          "value": "{{randomFamilyName}}", 
          "source": "response_json"
        }, 
        {
          "comparison": "equal", 
          "property": "name.givenName", 
          "value": "{{randomGivenName}}", 
          "source": "response_json"
        }, 
        {
          "comparison": "contains", 
          "property": "schemas", 
          "value": "urn:scim:schemas:core:1.0", 
          "source": "response_json"
        }, 
        {
          "comparison": "equal", 
          "property": "userName", 
          "value": "{{randomUsername}}", 
          "source": "response_json"
        }
      ], 
      "scripts": [
        ""
      ], 
      "before_scripts": [], 
      "method": "POST"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "url": "{{SCIMBaseURL}}/Users/{{idUserOne}}", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Required Test: Verify that user was created", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/json; charset=utf-8"
        ], 
        "Authorization": "{{auth}}", 
        "Accept": [
          "application/json"
        ], 
        "User-Agent": [
          "OKTA SCIM Integration"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "equal", 
          "property": "userName", 
          "value": "{{randomUsername}}", 
          "source": "response_json"
        }, 
        {
          "comparison": "equal", 
          "property": "name.familyName", 
          "value": "{{randomFamilyName}}", 
          "source": "response_json"
        }, 
        {
          "comparison": "equal", 
          "property": "name.givenName", 
          "value": "{{randomGivenName}}", 
          "source": "response_json"
        }, 
        {
          "comparison": "is_less_than", 
          "value": "600", 
          "source": "response_time"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "body": "{\"schemas\":[\"urn:scim:schemas:core:1.0\"],\"userName\":\"{{randomUsername}}\",\"name\":{\"givenName\":\"{{randomGivenName}}\",\"familyName\":\"{{randomFamilyName}}\"},\"emails\":[{\"primary\":true,\"value\":\"{{randomEmail}}\",\"type\":\"work\"}],\"displayName\":\"{{randomGivenName}} {{randomFamilyName}}\",\"active\":true}", 
      "form": {}, 
      "url": "{{SCIMBaseURL}}/Users", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Required Test: Expect failure when recreating user with same values", 
      "headers": {
        "Authorization": "{{auth}}",
        "Content-Type": [
          "application/json"
        ],
        "Accept": [
          "application/json; charset=utf-8"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": "409", 
          "source": "response_status"
        }, 
        {
          "comparison": "is_less_than", 
          "value": "600", 
          "source": "response_time"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "POST"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "url": "{{SCIMBaseURL}}/Users?filter={{randomUsernameCaps}}", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Required Test: Username Case Sensitivity Check", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/json; charset=utf-8"
        ], 
        "Authorization": "{{auth}}", 
        "Accept": [
          "application/json"
        ], 
        "User-Agent": [
          "OKTA SCIM Integration"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": "400", 
          "source": "response_status"
        }, 
        {
          "comparison": "is_less_than", 
          "value": "600", 
          "source": "response_time"
        }
      ], 
      "scripts": [], 
      "before_scripts": [], 
      "method": "GET"
    }, 
    {
      "duration": 5, 
      "step_type": "pause"
    }, 
    {
      "url": "{{SCIMBaseURL}}/Groups", 
      "variables": [], 
      "step_type": "request", 
      "auth": {}, 
      "note": "Optional Test: Verify Groups endpoint", 
      "headers": {
        "Accept-Charset": [
          "utf-8"
        ], 
        "Content-Type": [
          "application/json; charset=utf-8"
        ], 
        "Accept": [
          "application/json"
        ], 
        "Authorization": "{{auth}}", 
        "User-Agent": [
          "OKTA SCIM Integration"
        ]
      }, 
      "assertions": [
        {
          "comparison": "equal_number", 
          "value": 200, 
          "source": "response_status"
        }, 
        {
          "comparison": "is_less_than", 
          "value": "600", 
          "source": "response_time"
        }
      ], 
      "scripts": [
        "var data = JSON.parse(response.body);\nvar max = data.totalResults;\nvar res = data.Resources;\nvar exists = false;\nif (max >= 1 && Array.isArray(res)) {\n    exists = true;\n}\n    \nassert.ok(exists, \"Resources is of type Array\");\nlog(exists);"
      ], 
      "before_scripts": [], 
      "method": "GET"
    }
  ], 
  "description": "Basic tests to see if your SCIM server will work with Okta"
}

