{
    "info": {
        "_postman_id": "1e8676e1-4d2b-4185-a89d-ccd3eb0591dc",
        "name": "SCIM Tests",
        "description": "The set of tests for the SCIM reference api",
        "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
    },
    "item": [
        {
            "name": "Get Token",
            "item": [
                {
                    "name": "Get Token",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "var jsonData = JSON.parse(responseBody);\r",
                                    "postman.setEnvironmentVariable(\"token\", jsonData.token);\r",
                                    "\r",
                                    "pm.test(\"Status code is 200\", function () {\r",
                                    "    pm.response.to.have.status(200);\r",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "protocolProfileBehavior": {
                        "disableBodyPruning": true
                    },
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "\"SecureLogin\"",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Token"
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Endpoint tests",
            "item": [
                {
                    "name": "Get empty Users",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {\r",
                                    "    pm.response.to.have.status(200);\r",
                                    "});"
                                ]
                            }
                        },
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.environment.get(\"token\");"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/users",
                        "description": "Validate User enpoint exists"
                    },
                    "response": []
                },
                {
                    "name": "Get empty Groups",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {\r",
                                    "    pm.response.to.have.status(200);\r",
                                    "});"
                                ]
                            }
                        },
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.environment.get(\"token\");"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups"
                    },
                    "response": []
                },
                {
                    "name": "Get ResourceTypes",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {\r",
                                    "    pm.response.to.have.status(200);\r",
                                    "});\r",
                                    "\r",
                                    "pm.test(\"User endpoint exists\", function () {\r",
                                    "    var jsonData = pm.response.json();\r",
                                    "    pm.expect(jsonData[0].endpoint).to.eql(\"/Users\");\r",
                                    "});"
                                ]
                            }
                        },
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.environment.get(\"token\");"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/ResourceTypes"
                    },
                    "response": []
                },
                {
                    "name": "Get ServiceProviderConfig",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {\r",
                                    "    pm.response.to.have.status(200);\r",
                                    "});\r",
                                    "\r",
                                    "pm.test(\"Pach supported is true\", function () {\r",
                                    "    var jsonData = pm.response.json();\r",
                                    "    pm.expect(jsonData.patch.supported).to.eql(true);\r",
                                    "});"
                                ]
                            }
                        },
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.environment.get(\"token\");"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/serviceConfiguration"
                    },
                    "response": []
                },
                {
                    "name": "Get Schemas",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {\r",
                                    "    pm.response.to.have.status(200);\r",
                                    "});\r",
                                    "\r",
                                    "pm.test(\"Body contians User Account\", function () {\r",
                                    "pm.expect(pm.response.text()).to.include(\"User Account\");\r",
                                    "});"
                                ]
                            }
                        },
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.environment.get(\"token\");"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Schemas"
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "User tests",
            "item": [
                {
                    "name": "Post User",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"id1\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "type": "text",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"UserName\": \"UserName123\",\r\n    \"Active\": true,\r\n    \"DisplayName\": \"BobIsAmazing\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ],\r\n  \"externalId\": \"${__UUID}\",\r\n    \"name\": {\r\n        \"formatted\": \"Ryan Leenay\",\r\n        \"familyName\": \"Leenay\",\r\n        \"givenName\": \"Ryan\"\r\n    },\r\n    \"emails\": [\r\n        {\r\n            \"Primary\": true,\r\n            \"type\": \"work\",\r\n            \"value\": \"testing@bob.com\"\r\n        },\r\n        {\r\n            \"Primary\": false,\r\n            \"type\": \"home\",\r\n            \"value\": \"testinghome@bob.com\"\r\n        }\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users",
                        "description": "Create a user with many attributes"
                    },
                    "response": []
                },
                {
                    "name": "Post EnterpriseUser",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"id2\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "type": "text",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"UserName\": \"UserName222\",\r\n    \"Active\": true,\r\n    \"DisplayName\": \"lennay\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\",\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ],\r\n  \"externalId\": \"${__UUID}\",\r\n    \"name\": {\r\n        \"formatted\": \"Adrew Ryan\",\r\n        \"familyName\": \"Ryan\",\r\n        \"givenName\": \"Andrew\"\r\n    },\r\n    \"emails\": [\r\n        {\r\n            \"Primary\": true,\r\n            \"type\": \"work\",\r\n            \"value\": \"testing@bob2.com\"\r\n        },\r\n        {\r\n            \"Primary\": false,\r\n            \"type\": \"home\",\r\n            \"value\": \"testinghome@bob3.com\"\r\n        }\r\n    ],\r\n    \"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\": {\r\n    \t\t\"Department\": \"bob\",\r\n    \t\t\"Manager\" : { \"Value\": \"SuzzyQ\" }\r\n    }\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users",
                        "description": "Create a user with many attributes"
                    },
                    "response": []
                },
                {
                    "name": "Get user1",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "pm.test(\"Id is requsted\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    var id = pm.environment.get(\"id1\");",
                                    "    pm.expect(jsonData.id).to.eql(id);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{id1}}"
                    },
                    "response": []
                },
                {
                    "name": "Get user2",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "pm.test(\"Id is requsted\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "        var id = pm.environment.get(\"id2\");",
                                    "    pm.expect(jsonData.id).to.eql(id);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{id2}}"
                    },
                    "response": []
                },
                {
                    "name": "Get User Attributes",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "pm.test(\"Body contians id1\", function () {",
                                    "        var id = pm.environment.get(\"id1\");",
                                    "pm.expect(pm.response.text()).to.include(id);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "https://{{Server}}{{Port}}/{{Api}}/Users?attributes=userName,emails",
                            "protocol": "https",
                            "host": [
                                "{{Server}}{{Port}}"
                            ],
                            "path": [
                                "{{Api}}",
                                "Users"
                            ],
                            "query": [
                                {
                                    "key": "attributes",
                                    "value": "userName,emails"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Get User Filters",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Body contians id1\", function () {",
                                    "        var id = pm.environment.get(\"id1\");",
                                    "pm.expect(pm.response.text()).to.include(id);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "https://{{Server}}{{Port}}/{{Api}}/Users/?filter=DisplayName+eq+%22BobIsAmazing%22",
                            "protocol": "https",
                            "host": [
                                "{{Server}}{{Port}}"
                            ],
                            "path": [
                                "{{Api}}",
                                "Users",
                                ""
                            ],
                            "query": [
                                {
                                    "key": "filter",
                                    "value": "DisplayName+eq+%22BobIsAmazing%22"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "patch user1",
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "type": "text",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:api:messages:2.0:PatchOp\"\r\n    ],\r\n    \"Operations\": [\r\n        {\r\n            \"op\": \"replace\",\r\n            \"path\": \"userName\",\r\n            \"value\": \"ryan3\"\r\n        }\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{id1}}"
                    },
                    "response": []
                },
                {
                    "name": "Get User1 Check Patch",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "pm.test(\"Id matches\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    var id = pm.environment.get(\"id1\");",
                                    "    pm.expect(jsonData.id).to.eql(id);",
                                    "});",
                                    "",
                                    "pm.test(\"Username is changed\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.userName).to.eql(\"ryan3\");",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{id1}}"
                    },
                    "response": []
                },
                {
                    "name": "User 2 replace test",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"UserName\": \"UserNameReplace2\",\r\n    \"Active\": true,\r\n    \"DisplayName\": \"BobIsAmazing\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\",\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ],\r\n    \"id\": \"{{id2}}\",\r\n    \"externalId\": \"${__UUID}\",\r\n    \"name\": {\r\n        \"formatted\": \"NewName\",\r\n        \"familyName\": \"Leenay\",\r\n        \"givenName\": \"Ryan\"\r\n    },\r\n    \"emails\": [\r\n        {\r\n            \"Primary\": true,\r\n            \"type\": \"work\",\r\n            \"value\": \"testing@bobREPLACE.com\"\r\n        },\r\n        {\r\n            \"Primary\": false,\r\n            \"type\": \"home\",\r\n            \"value\": \"testinghome@bob.com\"\r\n        }\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{id2}}"
                    },
                    "response": []
                },
                {
                    "name": "Get user2 Check replace",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "pm.test(\"Name is updated\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.name.formatted).to.eql(\"NewName\");",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{id2}}"
                    },
                    "response": []
                },
                {
                    "name": "Delete user1",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{id1}}"
                    },
                    "response": []
                },
                {
                    "name": "Delete user2",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{id2}}"
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Group tests",
            "item": [
                {
                    "name": "Create empty group",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"groupid\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n  \"externalId\":\"${__UUID}\",\r\n  \"schemas\": [\"urn:ietf:params:scim:schemas:core:2.0:Group\"],\r\n  \"displayName\": \"Group1DisplayName\",\r\n  \"members\":[]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups"
                    },
                    "response": []
                },
                {
                    "name": "create user for group 2",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"id3\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"UserName\": \"UserName333\",\r\n    \"Active\": true,\r\n    \"DisplayName\": \"lennay\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\",\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ],\r\n  \"externalId\": \"${__UUID}\",\r\n    \"name\": {\r\n        \"formatted\": \"Adrew Ryan\",\r\n        \"familyName\": \"Ryan\",\r\n        \"givenName\": \"Andrew\"\r\n    },\r\n    \"emails\": [\r\n        {\r\n            \"Primary\": true,\r\n            \"type\": \"work\",\r\n            \"value\": \"testing@bob2.com\"\r\n        },\r\n        {\r\n            \"Primary\": false,\r\n            \"type\": \"home\",\r\n            \"value\": \"testinghome@bob3.com\"\r\n        }\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "Create user 4 for group 2",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"id4\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"UserName\": \"UserName444\",\r\n    \"Active\": true,\r\n    \"DisplayName\": \"lennay\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\",\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ],\r\n  \"externalId\": \"${__UUID}\",\r\n    \"name\": {\r\n        \"formatted\": \"Adrew Ryan\",\r\n        \"familyName\": \"Ryan\",\r\n        \"givenName\": \"Andrew\"\r\n    },\r\n    \"emails\": [\r\n        {\r\n            \"Primary\": true,\r\n            \"type\": \"work\",\r\n            \"value\": \"testing@bob2.com\"\r\n        },\r\n        {\r\n            \"Primary\": false,\r\n            \"type\": \"home\",\r\n            \"value\": \"testinghome@bob3.com\"\r\n        }\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "Create filled group 2",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"groupid2\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "type": "text",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n  \"schemas\": [\"urn:ietf:params:scim:schemas:core:2.0:Group\"],\r\n  \"externalId\":\"${__UUID}\",\r\n  \"displayName\": \"GroupDisplayName2\",\r\n  \"members\":\r\n  [\r\n  \t{\r\n  \t\t\"value\":\"{{id3}}\",\r\n  \t\t\"display\":\"VP\"\r\n  \t}\t\r\n  ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups"
                    },
                    "response": []
                },
                {
                    "name": "Get Groups",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups"
                    },
                    "response": []
                },
                {
                    "name": "Create group 3",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"groupid3\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n  \"schemas\": [\"urn:ietf:params:scim:schemas:core:2.0:Group\"],\r\n  \"externalId\":\"${__UUID}\",\r\n  \"displayName\": \"GroupDisplayName3\",\r\n  \"members\":[]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups"
                    },
                    "response": []
                },
                {
                    "name": "Put replace group3",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n  \"schemas\": [\"urn:ietf:params:scim:schemas:core:2.0:Group\"],\r\n  \"id\":\"{{groupid3}}\",\r\n  \"displayName\": \"putName\",\r\n  \"members\":[\r\n  \t{\r\n  \t\t\"value\": \"{{id3}}\",\r\n  \t\t\"display\":\"VP\"\r\n  \t},\r\n  \t{\r\n  \t\t\"value\":\"{{id4}}\",\r\n  \t\t\"display\":\"SenorVP\"\r\n  \t}\r\n  ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{groupid3}}"
                    },
                    "response": []
                },
                {
                    "name": "Validate group 3",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "pm.test(\"Id matches\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    var id = pm.environment.get(\"groupid3\");",
                                    "    pm.expect(jsonData.id).to.eql(id);",
                                    "});",
                                    "",
                                    "pm.test(\"Body contians user id3\", function () {",
                                    "    var id = pm.environment.get(\"id3\")",
                                    "pm.expect(pm.response.text()).to.include(id);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{groupid3}}"
                    },
                    "response": []
                },
                {
                    "name": "Patch add user4 to group1",
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:api:messages:2.0:PatchOp\"\r\n    ],\r\n    \"Operations\": [\r\n        {\r\n            \"name\": \"addMember\",\r\n            \"op\": \"add\",\r\n            \"path\": \"members\",\r\n            \"value\": [\r\n            \t{\r\n            \t\t\"displayName\":\"new User\",\r\n            \t\t\"value\":\"{{id4}}\"\t\r\n            \t}\r\n            \t]\r\n            \r\n        }\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{groupid}}"
                    },
                    "response": []
                },
                {
                    "name": "Patch remove user4 to group1",
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "type": "text",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:api:messages:2.0:PatchOp\"\r\n    ],\r\n    \"Operations\": [\r\n        {\r\n            \"op\": \"remove\",\r\n            \"path\": \"members[value eq \\\"{{id4}}\\\"]\"\r\n        }\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{groupid}}"
                    },
                    "response": []
                },
                {
                    "name": "Patch add user4 to group1",
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:api:messages:2.0:PatchOp\"\r\n    ],\r\n    \"Operations\": [\r\n        {\r\n            \"name\": \"addMember\",\r\n            \"op\": \"add\",\r\n            \"path\": \"members\",\r\n            \"value\": [\r\n            \t{\r\n            \t\t\"displayName\":\"new User\",\r\n            \t\t\"value\":\"{{id4}}\"\t\r\n            \t}\r\n            \t]\r\n            \r\n        }\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{groupid}}"
                    },
                    "response": []
                },
                {
                    "name": "Get group by id",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "pm.test(\"Id matches\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    var id = pm.environment.get(\"groupid\");",
                                    "    pm.expect(jsonData.id).to.eql(id);",
                                    "});",
                                    "",
                                    "pm.test(\"Body contians user\", function () {",
                                    "pm.expect(pm.response.text()).to.include(\"new User\");",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{groupid}}"
                    },
                    "response": []
                },
                {
                    "name": "Patch remove all users",
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:api:messages:2.0:PatchOp\"\r\n    ],\r\n    \"Operations\": [\r\n        {\r\n            \"op\": \"remove\",\r\n            \"path\": \"members\"\r\n        }\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{groupid}}"
                    },
                    "response": []
                },
                {
                    "name": "Get group by id",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "pm.test(\"Id matches\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    var id = pm.environment.get(\"groupid\");",
                                    "    pm.expect(jsonData.id).to.eql(id);",
                                    "});",
                                    "",
                                    "pm.test(\"Body contians user\", function () {",
                                    "pm.expect(pm.response.text()).to.not.include(\"new User\");",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{groupid}}"
                    },
                    "response": []
                },
                {
                    "name": "Delete user id3",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{id3}}"
                    },
                    "response": []
                },
                {
                    "name": "Delete user id4",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{id4}}"
                    },
                    "response": []
                },
                {
                    "name": "Delete group 1",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{groupid}}"
                    },
                    "response": []
                },
                {
                    "name": "Delete group 2",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{groupid2}}"
                    },
                    "response": []
                },
                {
                    "name": "Delete group3",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{groupid3}}"
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "ComplexAttribute tests",
            "item": [
                {
                    "name": "create user1",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"id1\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"UserName\": \"UserName111\",\r\n    \"Active\": true,\r\n    \"DisplayName\": \"BobIsAmazing\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\",\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ],\r\n  \"externalId\": \"${__UUID}\",\r\n    \"name\": {\r\n        \"formatted\": \"Ryan Leenay\",\r\n        \"familyName\": \"Leenay\",\r\n        \"givenName\": \"Ryan\"\r\n    },\r\n    \"emails\": [\r\n        {\r\n            \"Primary\": true,\r\n            \"type\": \"work\",\r\n            \"value\": \"emailName357\"\r\n        },\r\n        {\r\n            \"Primary\": false,\r\n            \"type\": \"home\",\r\n            \"value\": \"testinghome@bob.com\"\r\n        }\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "create user2",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"id2\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"UserName\": \"UserName222\",\r\n    \"Active\": true,\r\n    \"DisplayName\": \"BobIsAmazing\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\",\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ],\r\n  \"externalId\": \"${__UUID}\",\r\n    \"name\": {\r\n        \"formatted\": \"Ryan Leenay\",\r\n        \"familyName\": \"Leenay\",\r\n        \"givenName\": \"Ryan\"\r\n    },\r\n    \"emails\": [\r\n        {\r\n            \"Primary\": true,\r\n            \"type\": \"work\",\r\n            \"value\": \"jump@bob.com\"\r\n        },\r\n        {\r\n            \"Primary\": false,\r\n            \"type\": \"home\",\r\n            \"value\": \"testinghome@bob.com\"\r\n        }\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "Get user attributes",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "pm.test(\"Body contians User1 email\", function () {",
                                    "pm.expect(pm.response.text()).to.include(\"emailName357\");",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "https://{{Server}}{{Port}}/{{Api}}/Users?attributes=emails%5Btype+eq+%22work%22%5D",
                            "protocol": "https",
                            "host": [
                                "{{Server}}{{Port}}"
                            ],
                            "path": [
                                "{{Api}}",
                                "Users"
                            ],
                            "query": [
                                {
                                    "key": "attributes",
                                    "value": "emails%5Btype+eq+%22work%22%5D"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Get user via attributes filter",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "",
                                    "pm.test(\"Body contians User1 email\", function () {",
                                    "pm.expect(pm.response.text()).to.include(\"emailName357\");",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "https://{{Server}}{{Port}}/{{Api}}/Users?attributes=emails%5Bvalue+eq+%22emailName357%22%5D",
                            "protocol": "https",
                            "host": [
                                "{{Server}}{{Port}}"
                            ],
                            "path": [
                                "{{Api}}",
                                "Users"
                            ],
                            "query": [
                                {
                                    "key": "attributes",
                                    "value": "emails%5Bvalue+eq+%22emailName357%22%5D"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Delete User1",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{id1}}"
                    },
                    "response": []
                },
                {
                    "name": "Delete User2",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{id2}}"
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "User tests with garbage",
            "item": [
                {
                    "name": "Post user \"OMalley\"",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "pm.test(\"Username\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.userName).to.eql(\"OMalley\");",
                                    "});",
                                    "",
                                    "pm.test(\"Active true\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.active).to.eql(true);",
                                    "});",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"1stuserid\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"userName\": \"OMalley\",\r\n    \"active\": true,\r\n    \"addresses\": [\r\n        {\r\n            \"country\": \"Bermuda\",\r\n            \"formatted\": \"9132 Jennifer Way Suite 040\\nSouth Nancy, MI 55645\",\r\n            \"locality\": \"West Mercedes\",\r\n            \"postalCode\": \"99265\",\r\n            \"region\": \"Montana\",\r\n            \"streetAddress\": \"4939 Hess Fork\",\r\n            \"type\": \"work\",\r\n            \"primary\": false\r\n        },\r\n        {\r\n            \"country\": null,\r\n            \"formatted\": \"18522 Lisa Unions\\nEast Gregory, CT 52311\",\r\n            \"locality\": null,\r\n            \"postalCode\": null,\r\n            \"region\": null,\r\n            \"streetAddress\": null,\r\n            \"type\": \"other\",\r\n            \"primary\": false\r\n        }\r\n    ],\r\n    \"displayName\": \"Kimberly Baker\",\r\n    \"emails\": [\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"anna33@example.com\"\r\n        },\r\n        {\r\n            \"type\": \"other\",\r\n            \"primary\": false,\r\n            \"value\": \"anna33@gmail.com\"\r\n        }\r\n    ],\r\n    \"meta\": {\r\n        \"created\": \"2019-09-18T18:15:26.5788954+00:00\",\r\n        \"lastModified\": \"2019-09-18T18:15:26.5788976+00:00\",\r\n        \"resourceType\": \"User\"\r\n    },\r\n    \"name\": {\r\n        \"formatted\": \"Daniel Mcgee\",\r\n        \"familyName\": \"OMalley\",\r\n        \"givenName\": \"Darl\",\r\n        \"honorificPrefix\": null,\r\n        \"honorificSuffix\": null\r\n    },\r\n    \"phoneNumbers\": [\r\n        {\r\n            \"type\": \"fax\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-0500\"\r\n        },\r\n        {\r\n            \"type\": \"mobile\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-1707\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"312-320-0932\"\r\n        }\r\n    ],\r\n    \"preferredLanguage\": \"xh\",\r\n    \"roles\": [],\r\n    \"title\": \"Site engineer\",\r\n    \"externalId\": \"22fbc523-6032-4c5f-939d-5d4850cf3e52\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "Post emp1 with string \"True\"",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "pm.test(\"Active properly set\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.active).to.eql(true);",
                                    "});",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"2nduserid\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"userName\": \"emp1\",\r\n    \"active\": \"True\",\r\n    \"addresses\": [\r\n        {\r\n            \"country\": \"Bermuda\",\r\n            \"formatted\": \"9132 Jennifer Way Suite 040\\nSouth Nancy, MI 55645\",\r\n            \"locality\": \"West Mercedes\",\r\n            \"postalCode\": \"99265\",\r\n            \"region\": \"Montana\",\r\n            \"streetAddress\": \"4939 Hess Fork\",\r\n            \"type\": \"work\",\r\n            \"primary\": false\r\n        },\r\n        {\r\n            \"country\": null,\r\n            \"formatted\": \"18522 Lisa Unions\\nEast Gregory, CT 52311\",\r\n            \"locality\": null,\r\n            \"postalCode\": null,\r\n            \"region\": null,\r\n            \"streetAddress\": null,\r\n            \"type\": \"other\",\r\n            \"primary\": false\r\n        }\r\n    ],\r\n    \"displayName\": \"Kimberly Baker\",\r\n    \"emails\": [\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"anna33@gmail.com\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": false,\r\n            \"value\": \"anna33@example.com\"\r\n        }\r\n    ],\r\n    \"meta\": {\r\n        \"created\": \"2019-09-18T18:15:26.5788954+00:00\",\r\n        \"lastModified\": \"2019-09-18T18:15:26.5788976+00:00\",\r\n        \"resourceType\": \"User\"\r\n    },\r\n    \"name\": {\r\n        \"formatted\": \"Daniel Mcgee\",\r\n        \"familyName\": \"Employee\",\r\n        \"givenName\": \"Darl\",\r\n        \"honorificPrefix\": null,\r\n        \"honorificSuffix\": null\r\n    },\r\n    \"phoneNumbers\": [\r\n        {\r\n            \"type\": \"fax\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-0500\"\r\n        },\r\n        {\r\n            \"type\": \"mobile\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-1707\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"312-320-0932\"\r\n        }\r\n    ],\r\n    \"preferredLanguage\": \"xh\",\r\n    \"roles\": [],\r\n    \"title\": \"Site engineer\",\r\n    \"externalId\": \"22fbc523-6032-4c5f-939d-5d4850cf3e52\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "Get all users",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "pm.test(\"Results have 2 users\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.totalResults).to.eql(2);",
                                    "});",
                                    "",
                                    "pm.test(\"Body contians OMalley\", function () {",
                                    "pm.expect(pm.response.text()).to.include(\"OMalley\");",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "Post emp2",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"3rduserid\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"userName\": \"emp2\",\r\n    \"active\": true,\r\n    \"addresses\": [\r\n        {\r\n            \"country\": \"Bermuda\",\r\n            \"formatted\": \"9132 Jennifer Way Suite 040\\nSouth Nancy, MI 55645\",\r\n            \"locality\": \"West Mercedes\",\r\n            \"postalCode\": \"99265\",\r\n            \"region\": \"Montana\",\r\n            \"streetAddress\": \"4939 Hess Fork\",\r\n            \"type\": \"work\",\r\n            \"primary\": false\r\n        },\r\n        {\r\n            \"country\": null,\r\n            \"formatted\": \"18522 Lisa Unions\\nEast Gregory, CT 52311\",\r\n            \"locality\": null,\r\n            \"postalCode\": null,\r\n            \"region\": null,\r\n            \"streetAddress\": null,\r\n            \"type\": \"other\",\r\n            \"primary\": false\r\n        }\r\n    ],\r\n    \"displayName\": \"Kimberly Baker\",\r\n    \"emails\": [\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"anna33@gmail.com\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": false,\r\n            \"value\": \"anna33@example.com\"\r\n        }\r\n    ],\r\n    \"meta\": {\r\n        \"created\": \"2019-09-18T18:15:26.5788954+00:00\",\r\n        \"lastModified\": \"2019-09-18T18:15:26.5788976+00:00\",\r\n        \"resourceType\": \"User\"\r\n    },\r\n    \"name\": {\r\n        \"formatted\": \"Daniel Mcgee\",\r\n        \"familyName\": \"Employee\",\r\n        \"givenName\": \"Darl\",\r\n        \"honorificPrefix\": null,\r\n        \"honorificSuffix\": null\r\n    },\r\n    \"phoneNumbers\": [\r\n        {\r\n            \"type\": \"fax\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-0500\"\r\n        },\r\n        {\r\n            \"type\": \"mobile\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-1707\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"312-320-0932\"\r\n        }\r\n    ],\r\n    \"preferredLanguage\": \"xh\",\r\n    \"roles\": [],\r\n    \"title\": \"Site engineer\",\r\n    \"externalId\": \"22fbc523-6032-4c5f-939d-5d4850cf3e52\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "Post emp3",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"4thuserid\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "type": "text",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"userName\": \"emp3\",\r\n    \"active\": true,\r\n    \"addresses\": [\r\n        {\r\n            \"country\": \"Bermuda\",\r\n            \"formatted\": \"9132 Jennifer Way Suite 040\\nSouth Nancy, MI 55645\",\r\n            \"locality\": \"West Mercedes\",\r\n            \"postalCode\": \"99265\",\r\n            \"region\": \"Montana\",\r\n            \"streetAddress\": \"4939 Hess Fork\",\r\n            \"type\": \"work\",\r\n            \"primary\": false\r\n        },\r\n        {\r\n            \"country\": null,\r\n            \"formatted\": \"18522 Lisa Unions\\nEast Gregory, CT 52311\",\r\n            \"locality\": null,\r\n            \"postalCode\": null,\r\n            \"region\": null,\r\n            \"streetAddress\": null,\r\n            \"type\": \"other\",\r\n            \"primary\": false\r\n        }\r\n    ],\r\n    \"displayName\": \"Kimberly Baker\",\r\n    \"emails\": [\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"anna33@gmail.com\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": false,\r\n            \"value\": \"anna33@example.com\"\r\n        }\r\n    ],\r\n    \"meta\": {\r\n        \"created\": \"2019-09-18T18:15:26.5788954+00:00\",\r\n        \"lastModified\": \"2019-09-18T18:15:26.5788976+00:00\",\r\n        \"resourceType\": \"User\"\r\n    },\r\n    \"name\": {\r\n        \"formatted\": \"Daniel Mcgee\",\r\n        \"familyName\": \"Employee\",\r\n        \"givenName\": \"Darl\",\r\n        \"honorificPrefix\": null,\r\n        \"honorificSuffix\": null\r\n    },\r\n    \"phoneNumbers\": [\r\n        {\r\n            \"type\": \"fax\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-0500\"\r\n        },\r\n        {\r\n            \"type\": \"mobile\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-1707\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"312-320-0932\"\r\n        }\r\n    ],\r\n    \"preferredLanguage\": \"xh\",\r\n    \"roles\": [],\r\n    \"title\": \"Site engineer\",\r\n    \"externalId\": \"22fbc523-6032-4c5f-939d-5d4850cf3e52\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "Post no username",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 400\", function () {",
                                    "    pm.response.to.have.status(400);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"active\": true,\r\n    \"addresses\": [\r\n        {\r\n            \"country\": \"Bermuda\",\r\n            \"formatted\": \"9132 Jennifer Way Suite 040\\nSouth Nancy, MI 55645\",\r\n            \"locality\": \"West Mercedes\",\r\n            \"postalCode\": \"99265\",\r\n            \"region\": \"Montana\",\r\n            \"streetAddress\": \"4939 Hess Fork\",\r\n            \"type\": \"work\",\r\n            \"primary\": false\r\n        },\r\n        {\r\n            \"country\": null,\r\n            \"formatted\": \"18522 Lisa Unions\\nEast Gregory, CT 52311\",\r\n            \"locality\": null,\r\n            \"postalCode\": null,\r\n            \"region\": null,\r\n            \"streetAddress\": null,\r\n            \"type\": \"other\",\r\n            \"primary\": false\r\n        }\r\n    ],\r\n    \"displayName\": \"Kimberly Baker\",\r\n    \"emails\": [\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"anna33@gmail.com\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": false,\r\n            \"value\": \"anna33@example.com\"\r\n        }\r\n    ],\r\n    \"meta\": {\r\n        \"created\": \"2019-09-18T18:15:26.5788954+00:00\",\r\n        \"lastModified\": \"2019-09-18T18:15:26.5788976+00:00\",\r\n        \"resourceType\": \"User\"\r\n    },\r\n    \"name\": {\r\n        \"formatted\": \"Daniel Mcgee\",\r\n        \"familyName\": \"Employee\",\r\n        \"givenName\": \"Darl\",\r\n        \"honorificPrefix\": null,\r\n        \"honorificSuffix\": null\r\n    },\r\n    \"phoneNumbers\": [\r\n        {\r\n            \"type\": \"fax\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-0500\"\r\n        },\r\n        {\r\n            \"type\": \"mobile\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-1707\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"312-320-0932\"\r\n        }\r\n    ],\r\n    \"preferredLanguage\": \"xh\",\r\n    \"roles\": [],\r\n    \"title\": \"Site engineer\",\r\n    \"externalId\": \"22fbc523-6032-4c5f-939d-5d4850cf3e52\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "Post junk",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 400\", function () {",
                                    "    pm.response.to.have.status(400);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "type": "text",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"acve\": tre,\r\n    \"adadfdresses\": [\r\n        {\r\n            \"coudftry\": \"Beruda\",\r\n            \"formatted\": \"9132 Jennifer Way Suite 040\\nSouth Nancy, MI 55645\",\r\n            \"locality\": \"West Mercedes\",\r\n            \"postalCode\": \"99265\",\r\n            \"region\": \"Montana\",\r\n            \"streetAddress\": \"4939 Hess Fork\",\r\n            \"type\": \"work\",\r\n            \"primary\": false\r\n        },\r\n        {\r\n            \"country\": null,\r\n            \"formatted\": \"18522 Lisa Unions\\nEast Gregory, CT 52311\",\r\n            \"locality\": null,\r\n          les\": [],\r\n    \"title\": \"Site engineer\",\r\n    \"externalId\": \"22fbc523-6032-4c5f-939d-5d4850cf3e52\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "Post emp3 exists",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 409\", function () {",
                                    "    pm.response.to.have.status(409);",
                                    "});",
                                    "",
                                    "pm.test(\"Body contians Error detial\", function () {",
                                    "pm.expect(pm.response.text()).to.include(\"detail\");",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "type": "text",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"userName\": \"emp3\",\r\n    \"active\": true,\r\n    \"addresses\": [\r\n        {\r\n            \"country\": \"Bermuda\",\r\n            \"formatted\": \"9132 Jennifer Way Suite 040\\nSouth Nancy, MI 55645\",\r\n            \"locality\": \"West Mercedes\",\r\n            \"postalCode\": \"99265\",\r\n            \"region\": \"Montana\",\r\n            \"streetAddress\": \"4939 Hess Fork\",\r\n            \"type\": \"work\",\r\n            \"primary\": false\r\n        },\r\n        {\r\n            \"country\": null,\r\n            \"formatted\": \"18522 Lisa Unions\\nEast Gregory, CT 52311\",\r\n            \"locality\": null,\r\n            \"postalCode\": null,\r\n            \"region\": null,\r\n            \"streetAddress\": null,\r\n            \"type\": \"other\",\r\n            \"primary\": false\r\n        }\r\n    ],\r\n    \"displayName\": \"Kimberly Baker\",\r\n    \"emails\": [\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"anna33@gmail.com\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": false,\r\n            \"value\": \"anna33@example.com\"\r\n        }\r\n    ],\r\n    \"meta\": {\r\n        \"created\": \"2019-09-18T18:15:26.5788954+00:00\",\r\n        \"lastModified\": \"2019-09-18T18:15:26.5788976+00:00\",\r\n        \"resourceType\": \"User\"\r\n    },\r\n    \"name\": {\r\n        \"formatted\": \"Daniel Mcgee\",\r\n        \"familyName\": \"Employee\",\r\n        \"givenName\": \"Darl\",\r\n        \"honorificPrefix\": null,\r\n        \"honorificSuffix\": null\r\n    },\r\n    \"phoneNumbers\": [\r\n        {\r\n            \"type\": \"fax\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-0500\"\r\n        },\r\n        {\r\n            \"type\": \"mobile\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-1707\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"312-320-0932\"\r\n        }\r\n    ],\r\n    \"preferredLanguage\": \"xh\",\r\n    \"roles\": [],\r\n    \"title\": \"Site engineer\",\r\n    \"externalId\": \"22fbc523-6032-4c5f-939d-5d4850cf3e52\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "Post emp3 exists try again",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 409\", function () {",
                                    "    pm.response.to.have.status(409);",
                                    "});",
                                    "",
                                    "pm.test(\"Body contians Error detial\", function () {",
                                    "pm.expect(pm.response.text()).to.include(\"detail\");",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "type": "text",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"userName\": \"emp3\",\r\n    \"active\": true,\r\n    \"addresses\": [\r\n        {\r\n            \"country\": \"Bermuda\",\r\n            \"formatted\": \"9132 Jennifer Way Suite 040\\nSouth Nancy, MI 55645\",\r\n            \"locality\": \"West Mercedes\",\r\n            \"postalCode\": \"99265\",\r\n            \"region\": \"Montana\",\r\n            \"streetAddress\": \"4939 Hess Fork\",\r\n            \"type\": \"work\",\r\n            \"primary\": false\r\n        },\r\n        {\r\n            \"country\": null,\r\n            \"formatted\": \"18522 Lisa Unions\\nEast Gregory, CT 52311\",\r\n            \"locality\": null,\r\n            \"postalCode\": null,\r\n            \"region\": null,\r\n            \"streetAddress\": null,\r\n            \"type\": \"other\",\r\n            \"primary\": false\r\n        }\r\n    ],\r\n    \"displayName\": \"Kimberly Baker\",\r\n    \"emails\": [\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"anna33@gmail.com\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": false,\r\n            \"value\": \"anna33@example.com\"\r\n        }\r\n    ],\r\n    \"meta\": {\r\n        \"created\": \"2019-09-18T18:15:26.5788954+00:00\",\r\n        \"lastModified\": \"2019-09-18T18:15:26.5788976+00:00\",\r\n        \"resourceType\": \"User\"\r\n    },\r\n    \"name\": {\r\n        \"formatted\": \"Daniel Mcgee\",\r\n        \"familyName\": \"Employee\",\r\n        \"givenName\": \"Darl\",\r\n        \"honorificPrefix\": null,\r\n        \"honorificSuffix\": null\r\n    },\r\n    \"phoneNumbers\": [\r\n        {\r\n            \"type\": \"fax\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-0500\"\r\n        },\r\n        {\r\n            \"type\": \"mobile\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-1707\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"312-320-0932\"\r\n        }\r\n    ],\r\n    \"preferredLanguage\": \"xh\",\r\n    \"roles\": [],\r\n    \"title\": \"Site engineer\",\r\n    \"externalId\": \"22fbc523-6032-4c5f-939d-5d4850cf3e52\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "Put a user no username",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 400\", function () {",
                                    "    pm.response.to.have.status(400);",
                                    "});",
                                    ""
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "type": "text",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n\t\"id\" : \"{{1stuserid}}\",\r\n    \"userame\": \"OMalley\",\r\n    \"active\": false,\r\n    \"addresses\": [\r\n        {\r\n            \"country\": \"Germany\",\r\n            \"formatted\": \"1923 Jennifer Way Suite 040\\nSouth Nancy, MI 55645\",\r\n            \"locality\": \"East Mercedes\",\r\n            \"postalCode\": \"99265\",\r\n            \"region\": \"Montana\",\r\n            \"streetAddress\": \"4939 Hess Fork\",\r\n            \"type\": \"work\",\r\n            \"primary\": false\r\n        },\r\n        {\r\n            \"country\": \"bahams\",\r\n            \"formatted\": \"18522 Lisa Unions\\nEast Gregory, CT 52311\",\r\n            \"locality\": null,\r\n            \"postalCode\": null,\r\n            \"region\": null,\r\n            \"streetAddress\": null,\r\n            \"type\": \"other\",\r\n            \"primary\": false\r\n        }\r\n    ],\r\n    \"displayName\": \"Kimberly Baker\",\r\n    \"emails\": [\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"anna33@example.com\"\r\n        },\r\n        {\r\n            \"type\": \"other\",\r\n            \"primary\": false,\r\n            \"value\": \"anna33@gmail.com\"\r\n        }\r\n    ],\r\n    \"meta\": {\r\n        \"created\": \"2019-09-18T18:15:26.5788954+00:00\",\r\n        \"lastModified\": \"2019-09-18T18:15:26.5788976+00:00\",\r\n        \"resourceType\": \"User\"\r\n    },\r\n    \"name\": {\r\n        \"formatted\": \"Daniel Mcgee\",\r\n        \"familyName\": \"OMalley\",\r\n        \"givenName\": \"Darl\",\r\n        \"honorificPrefix\": null,\r\n        \"honorificSuffix\": null\r\n    },\r\n    \"phoneNumbers\": [\r\n        {\r\n            \"type\": \"fax\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-0500\"\r\n        },\r\n        {\r\n            \"type\": \"mobile\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-1707\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"312-320-0932\"\r\n        }\r\n    ],\r\n    \"preferredLanguage\": \"xh\",\r\n    \"roles\": [],\r\n    \"title\": \"Site engineer\",\r\n    \"externalId\": \"22fbc523-6032-4c5f-939d-5d4850cf3e52\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{1stuserid}}"
                    },
                    "response": []
                },
                {
                    "name": "Put a user misspelled attribute",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "pm.test(\"Body does not contians Addresses\", function () {",
                                    "pm.expect(pm.response.text()).to.not.include(\"Addresses\");",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n\t\"id\" : \"{{1stuserid}}\",\r\n    \"userName\": \"OMalley\",\r\n    \"active\": false,\r\n    \"adreses\": [\r\n        {\r\n            \"country\": \"Germany\",\r\n            \"formatted\": \"1923 Jennifer Way Suite 040\\nSouth Nancy, MI 55645\",\r\n            \"locality\": \"East Mercedes\",\r\n            \"postalCode\": \"99265\",\r\n            \"region\": \"Montana\",\r\n            \"streetAddress\": \"4939 Hess Fork\",\r\n            \"type\": \"work\",\r\n            \"primary\": false\r\n        },\r\n        {\r\n            \"country\": \"bahams\",\r\n            \"formatted\": \"18522 Lisa Unions\\nEast Gregory, CT 52311\",\r\n            \"locality\": null,\r\n            \"postalCode\": null,\r\n            \"region\": null,\r\n            \"streetAddress\": null,\r\n            \"type\": \"other\",\r\n            \"primary\": false\r\n        }\r\n    ],\r\n    \"displayName\": \"Kimberly Baker\",\r\n    \"emails\": [\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"anna33@example.com\"\r\n        },\r\n        {\r\n            \"type\": \"other\",\r\n            \"primary\": false,\r\n            \"value\": \"anna33@gmail.com\"\r\n        }\r\n    ],\r\n    \"meta\": {\r\n        \"created\": \"2019-09-18T18:15:26.5788954+00:00\",\r\n        \"lastModified\": \"2019-09-18T18:15:26.5788976+00:00\",\r\n        \"resourceType\": \"User\"\r\n    },\r\n    \"name\": {\r\n        \"formatted\": \"Daniel Mcgee\",\r\n        \"familyName\": \"OMalley\",\r\n        \"givenName\": \"Darl\",\r\n        \"honorificPrefix\": null,\r\n        \"honorificSuffix\": null\r\n    },\r\n    \"phoneNumbers\": [\r\n        {\r\n            \"type\": \"fax\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-0500\"\r\n        },\r\n        {\r\n            \"type\": \"mobile\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-1707\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"312-320-0932\"\r\n        }\r\n    ],\r\n    \"preferredLanguage\": \"xh\",\r\n    \"roles\": [],\r\n    \"title\": \"Site engineer\",\r\n    \"externalId\": \"22fbc523-6032-4c5f-939d-5d4850cf3e52\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{1stuserid}}"
                    },
                    "response": []
                },
                {
                    "name": "Post enterprise user",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"enteruserid\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"userName\": \"enterprise\",\r\n    \"active\": true,\r\n    \"addresses\": [\r\n        {\r\n            \"country\": \"Bermuda\",\r\n            \"formatted\": \"9132 Jennifer Way Suite 040\\nSouth Nancy, MI 55645\",\r\n            \"locality\": \"West Mercedes\",\r\n            \"postalCode\": \"99265\",\r\n            \"region\": \"Montana\",\r\n            \"streetAddress\": \"4939 Hess Fork\",\r\n            \"type\": \"work\",\r\n            \"primary\": false\r\n        },\r\n        {\r\n            \"country\": null,\r\n            \"formatted\": \"18522 Lisa Unions\\nEast Gregory, CT 52311\",\r\n            \"locality\": null,\r\n            \"postalCode\": null,\r\n            \"region\": null,\r\n            \"streetAddress\": null,\r\n            \"type\": \"other\",\r\n            \"primary\": false\r\n        }\r\n    ],\r\n    \"Department\": \"some department\",\r\n    \"displayName\": \"Kimberly Baker\",\r\n    \"emails\": [\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"anna33@gmail.com\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": false,\r\n            \"value\": \"anna33@example.com\"\r\n        }\r\n    ],\r\n    \"meta\": {\r\n        \"created\": \"2019-09-18T18:15:26.5788954+00:00\",\r\n        \"lastModified\": \"2019-09-18T18:15:26.5788976+00:00\",\r\n        \"resourceType\": \"User\"\r\n    },\r\n    \"name\": {\r\n        \"formatted\": \"Daniel Mcgee\",\r\n        \"familyName\": \"Employee\",\r\n        \"givenName\": \"Darl\",\r\n        \"honorificPrefix\": null,\r\n        \"honorificSuffix\": null\r\n    },\r\n    \"phoneNumbers\": [\r\n        {\r\n            \"type\": \"fax\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-0500\"\r\n        },\r\n        {\r\n            \"type\": \"mobile\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-1707\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"312-320-0932\"\r\n        }\r\n    ],\r\n    \"preferredLanguage\": \"xh\",\r\n    \"roles\": [],\r\n    \"title\": \"Site engineer\",\r\n    \"externalId\": \"22fbc523-6032-4c5f-939d-5d4850cf3e52\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\",\r\n        \"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "Patch user omalley new username",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{ \"schemas\":\r\n       [\"urn:ietf:params:scim:api:messages:2.0:PatchOp\"],\r\n     \"Operations\":[\r\n       {\r\n        \"op\":\"Replace\",\r\n        \"path\":\"userName\",\r\n        \"value\":\"newusername\"\r\n       }]\r\n   }",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{1stuserid}}"
                    },
                    "response": []
                },
                {
                    "name": "patch user omalley active with boolean",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{ \"schemas\":\r\n       [\"urn:ietf:params:scim:api:messages:2.0:PatchOp\"],\r\n     \"Operations\":[\r\n       {\r\n        \"op\":\"Replace\",\r\n        \"path\":\"active\",\r\n        \"value\": false\r\n       }]\r\n   }",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{1stuserid}}"
                    },
                    "response": []
                },
                {
                    "name": "get user1",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Username changed\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.userName).to.eql(\"newusername\");",
                                    "});",
                                    "",
                                    "pm.test(\"Active changed\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.active).to.eql(false);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{1stuserid}}"
                    },
                    "response": []
                },
                {
                    "name": "Put a user OMalley",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "pm.test(\"Username\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.userName).to.eql(\"OMalley\");",
                                    "});",
                                    "",
                                    "pm.test(\"Active\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.active).to.eql(false);",
                                    "});",
                                    "",
                                    "pm.test(\"Body contians Germany\", function () {",
                                    "pm.expect(pm.response.text()).to.include(\"Germany\");",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "type": "text",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n\t\"id\" : \"{{1stuserid}}\",\r\n    \"userName\": \"OMalley\",\r\n    \"active\": false,\r\n    \"addresses\": [\r\n        {\r\n            \"country\": \"Germany\",\r\n            \"formatted\": \"1923 Jennifer Way Suite 040\\nSouth Nancy, MI 55645\",\r\n            \"locality\": \"East Mercedes\",\r\n            \"postalCode\": \"99265\",\r\n            \"region\": \"Montana\",\r\n            \"streetAddress\": \"4939 Hess Fork\",\r\n            \"type\": \"work\",\r\n            \"primary\": false\r\n        },\r\n        {\r\n            \"country\": \"bahams\",\r\n            \"formatted\": \"18522 Lisa Unions\\nEast Gregory, CT 52311\",\r\n            \"locality\": null,\r\n            \"postalCode\": null,\r\n            \"region\": null,\r\n            \"streetAddress\": null,\r\n            \"type\": \"other\",\r\n            \"primary\": false\r\n        }\r\n    ],\r\n    \"displayName\": \"Kimberly Baker\",\r\n    \"emails\": [\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"anna33@example.com\"\r\n        },\r\n        {\r\n            \"type\": \"other\",\r\n            \"primary\": false,\r\n            \"value\": \"anna33@gmail.com\"\r\n        }\r\n    ],\r\n    \"meta\": {\r\n        \"created\": \"2019-09-18T18:15:26.5788954+00:00\",\r\n        \"lastModified\": \"2019-09-18T18:15:26.5788976+00:00\",\r\n        \"resourceType\": \"User\"\r\n    },\r\n    \"name\": {\r\n        \"formatted\": \"Daniel Mcgee\",\r\n        \"familyName\": \"OMalley\",\r\n        \"givenName\": \"Darl\",\r\n        \"honorificPrefix\": null,\r\n        \"honorificSuffix\": null\r\n    },\r\n    \"phoneNumbers\": [\r\n        {\r\n            \"type\": \"fax\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-0500\"\r\n        },\r\n        {\r\n            \"type\": \"mobile\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-1707\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"312-320-0932\"\r\n        }\r\n    ],\r\n    \"preferredLanguage\": \"xh\",\r\n    \"roles\": [],\r\n    \"title\": \"Site engineer\",\r\n    \"externalId\": \"22fbc523-6032-4c5f-939d-5d4850cf3e52\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{1stuserid}}"
                    },
                    "response": []
                },
                {
                    "name": "Paginate",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Total results\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.totalResults).to.eql(5);",
                                    "});",
                                    "",
                                    "pm.test(\"JSON Assertion items per page\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.itemsPerPage).to.eql(2);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "https://{{Server}}{{Port}}/{{Api}}/Users?startIndex=1&count=2",
                            "protocol": "https",
                            "host": [
                                "{{Server}}{{Port}}"
                            ],
                            "path": [
                                "{{Api}}",
                                "Users"
                            ],
                            "query": [
                                {
                                    "key": "startIndex",
                                    "value": "1"
                                },
                                {
                                    "key": "count",
                                    "value": "2"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "get user attributes",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Total results\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.totalResults).to.eql(5);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "https://{{Server}}{{Port}}/{{Api}}/Users?attributes=userName,emails",
                            "protocol": "https",
                            "host": [
                                "{{Server}}{{Port}}"
                            ],
                            "path": [
                                "{{Api}}",
                                "Users"
                            ],
                            "query": [
                                {
                                    "key": "attributes",
                                    "value": "userName,emails"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Post emp3 exists try again",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 409\", function () {",
                                    "    pm.response.to.have.status(409);",
                                    "});",
                                    "",
                                    "pm.test(\"Body contians Error detial\", function () {",
                                    "pm.expect(pm.response.text()).to.include(\"detail\");",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "type": "text",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"userName\": \"emp3\",\r\n    \"active\": true,\r\n    \"addresses\": [\r\n        {\r\n            \"country\": \"Bermuda\",\r\n            \"formatted\": \"9132 Jennifer Way Suite 040\\nSouth Nancy, MI 55645\",\r\n            \"locality\": \"West Mercedes\",\r\n            \"postalCode\": \"99265\",\r\n            \"region\": \"Montana\",\r\n            \"streetAddress\": \"4939 Hess Fork\",\r\n            \"type\": \"work\",\r\n            \"primary\": false\r\n        },\r\n        {\r\n            \"country\": null,\r\n            \"formatted\": \"18522 Lisa Unions\\nEast Gregory, CT 52311\",\r\n            \"locality\": null,\r\n            \"postalCode\": null,\r\n            \"region\": null,\r\n            \"streetAddress\": null,\r\n            \"type\": \"other\",\r\n            \"primary\": false\r\n        }\r\n    ],\r\n    \"displayName\": \"Kimberly Baker\",\r\n    \"emails\": [\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"anna33@gmail.com\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": false,\r\n            \"value\": \"anna33@example.com\"\r\n        }\r\n    ],\r\n    \"meta\": {\r\n        \"created\": \"2019-09-18T18:15:26.5788954+00:00\",\r\n        \"lastModified\": \"2019-09-18T18:15:26.5788976+00:00\",\r\n        \"resourceType\": \"User\"\r\n    },\r\n    \"name\": {\r\n        \"formatted\": \"Daniel Mcgee\",\r\n        \"familyName\": \"Employee\",\r\n        \"givenName\": \"Darl\",\r\n        \"honorificPrefix\": null,\r\n        \"honorificSuffix\": null\r\n    },\r\n    \"phoneNumbers\": [\r\n        {\r\n            \"type\": \"fax\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-0500\"\r\n        },\r\n        {\r\n            \"type\": \"mobile\",\r\n            \"primary\": false,\r\n            \"value\": \"312-320-1707\"\r\n        },\r\n        {\r\n            \"type\": \"work\",\r\n            \"primary\": true,\r\n            \"value\": \"312-320-0932\"\r\n        }\r\n    ],\r\n    \"preferredLanguage\": \"xh\",\r\n    \"roles\": [],\r\n    \"title\": \"Site engineer\",\r\n    \"externalId\": \"22fbc523-6032-4c5f-939d-5d4850cf3e52\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:User\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users"
                    },
                    "response": []
                },
                {
                    "name": "filter eq and (val or val)",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Total results\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.totalResults).to.eql(4);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "https://{{Server}}{{Port}}/{{Api}}/Users?filter=name.FamilyName eq Employee and (emails.Value co example.com or emails.Value co example.org)",
                            "protocol": "https",
                            "host": [
                                "{{Server}}{{Port}}"
                            ],
                            "path": [
                                "{{Api}}",
                                "Users"
                            ],
                            "query": [
                                {
                                    "key": "filter",
                                    "value": "name.FamilyName eq Employee and (emails.Value co example.com or emails.Value co example.org)"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "filter starts with",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Total results\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.totalResults).to.eql(1);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "https://{{Server}}{{Port}}/{{Api}}/Users?filter=userName sw O",
                            "protocol": "https",
                            "host": [
                                "{{Server}}{{Port}}"
                            ],
                            "path": [
                                "{{Api}}",
                                "Users"
                            ],
                            "query": [
                                {
                                    "key": "filter",
                                    "value": "userName sw O"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "filter greater than",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Total results\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.totalResults).to.eql(5);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "https://{{Server}}{{Port}}/{{Api}}/Users?filter=meta.Created gt 2015-10-10T14:38:21.8617979-07:00",
                            "protocol": "https",
                            "host": [
                                "{{Server}}{{Port}}"
                            ],
                            "path": [
                                "{{Api}}",
                                "Users"
                            ],
                            "query": [
                                {
                                    "key": "filter",
                                    "value": "meta.Created gt 2015-10-10T14:38:21.8617979-07:00"
                                }
                            ]
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Group tests with garbage",
            "item": [
                {
                    "name": "Post group",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 201\", function () {",
                                    "    pm.response.to.have.status(201);",
                                    "});",
                                    "",
                                    "var jsonData = pm.response.json();",
                                    "",
                                    "pm.environment.set(\"1stgroupid\", jsonData.id);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"displayName\": \"Group 1\",\r\n    \"externalId\": \"015489ea-9410-4306-b583-9f002b2446f7\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:Group\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups"
                    },
                    "response": []
                },
                {
                    "name": "Group patch add member",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});",
                                    "",
                                    ""
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n\t\"id\": \"{{1stgroupid}}\",\r\n    \"Operations\": [\r\n        {\r\n         \"op\":\"add\", \r\n         \"path\": \"members\", \r\n         \"value\": \"string id 1\"\r\n        }\r\n    ],\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:api:messages:2.0:PatchOp\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{1stgroupid}}"
                    },
                    "response": []
                },
                {
                    "name": "Group patch add member2",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});",
                                    "",
                                    ""
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "type": "text",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n\t\"id\": \"{{1stgroupid}}\",\r\n    \"Operations\": [\r\n        {\r\n         \"op\":\"add\", \r\n         \"path\": \"members\", \r\n         \"value\": \"string id 2\"\r\n        }\r\n    ],\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:api:messages:2.0:PatchOp\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{1stgroupid}}"
                    },
                    "response": []
                },
                {
                    "name": "Get group",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    ""
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{1stgroupid}}"
                    },
                    "response": []
                },
                {
                    "name": "Get group exclude members",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    ""
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "GET",
                        "header": [],
                        "url": {
                            "raw": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{1stgroupid}}?excludedAttributes=members",
                            "protocol": "https",
                            "host": [
                                "{{Server}}{{Port}}"
                            ],
                            "path": [
                                "{{Api}}",
                                "Groups",
                                "{{1stgroupid}}"
                            ],
                            "query": [
                                {
                                    "key": "excludedAttributes",
                                    "value": "members"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "group put",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.response.to.have.status(200);",
                                    "});",
                                    "",
                                    "pm.test(\"Your test name\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData.displayName).to.eql(\"Tiffany Ortiz\");",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "name": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"id\": \"{{1stgroupid}}\",\r\n    \"displayName\": \"Tiffany Ortiz\",\r\n    \"externalId\": \"6c6b54c2-fa81-4234-ad4f-420ec6808049\",\r\n    \"schemas\": [\r\n        \"urn:ietf:params:scim:schemas:core:2.0:Group\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{1stgroupid}}"
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Teardown garbage",
            "item": [
                {
                    "name": "Delete user 1",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{1stuserid}}"
                    },
                    "response": []
                },
                {
                    "name": "Delete user 2",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{2nduserid}}"
                    },
                    "response": []
                },
                {
                    "name": "Delete user3 emp2",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{3rduserid}}"
                    },
                    "response": []
                },
                {
                    "name": "Delete user4 emp3",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{4thuserid}}"
                    },
                    "response": []
                },
                {
                    "name": "Delete enterprise user",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Users/{{enteruserid}}"
                    },
                    "response": []
                },
                {
                    "name": "Delete group 1",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status code is 204\", function () {",
                                    "    pm.response.to.have.status(204);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "bearer",
                            "bearer": {
                                "token": "{{token}}"
                            }
                        },
                        "method": "DELETE",
                        "header": [],
                        "url": "https://{{Server}}{{Port}}/{{Api}}/Groups/{{1stgroupid}}"
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Get all users",
            "event": [
                {
                    "listen": "test",
                    "script": {
                        "type": "text/javascript",
                        "exec": [
                            "pm.test(\"Status code is 200\", function () {",
                            "    pm.response.to.have.status(200);",
                            "});",
                            "",
                            "pm.test(\"Users cleared\", function () {",
                            "    var jsonData = pm.response.json();",
                            "    pm.expect(jsonData.Resources).to.eql([]);",
                            "});"
                        ]
                    }
                }
            ],
            "request": {
                "auth": {
                    "type": "bearer",
                    "bearer": {
                        "token": "{{token}}"
                    }
                },
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "https://{{Server}}{{Port}}/{{Api}}/Users?attributes=userName",
                    "protocol": "https",
                    "host": [
                        "{{Server}}{{Port}}"
                    ],
                    "path": [
                        "{{Api}}",
                        "Users"
                    ],
                    "query": [
                        {
                            "key": "attributes",
                            "value": "userName"
                        }
                    ]
                }
            },
            "response": []
        },
        {
            "name": "Get all groups",
            "event": [
                {
                    "listen": "test",
                    "script": {
                        "type": "text/javascript",
                        "exec": [
                            "pm.test(\"Status code is 200\", function () {",
                            "    pm.response.to.have.status(200);",
                            "});",
                            "",
                            "pm.test(\"Groups cleared\", function () {",
                            "    var jsonData = pm.response.json();",
                            "    pm.expect(jsonData.Resources).to.eql([]);",
                            "});"
                        ]
                    }
                }
            ],
            "request": {
                "auth": {
                    "type": "bearer",
                    "bearer": {
                        "token": "{{token}}"
                    }
                },
                "method": "GET",
                "header": [],
                "url": "https://{{Server}}{{Port}}/{{Api}}/Groups"
            },
            "response": []
        }
    ],
    "event": [
        {
            "listen": "prerequest",
            "script": {
                "type": "text/javascript",
                "exec": [
                    ""
                ]
            }
        },
        {
            "listen": "test",
            "script": {
                "type": "text/javascript",
                "exec": [
                    ""
                ]
            }
        }
    ]
}