# SCIM 2.0 SPEC Test - bad assertion for 401 response schema

**URL:** <https://devforum.okta.com/t/scim-2-0-spec-test-bad-assertion-for-401-response-schema/28432>\
**Category:** SCIM\
**Tags:** runscope\
**Created:** [May 23, 2024, 11:37am UTC](https://devforum.okta.com/t/scim-2-0-spec-test-bad-assertion-for-401-response-schema/28432 "2024-05-23T11:37:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adampl](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@adampl](https://devforum.okta.com/u/adampl)\
**Post date:** [May 23, 2024, 11:37am UTC](https://devforum.okta.com/t/scim-2-0-spec-test-bad-assertion-for-401-response-schema/28432/1 "2024-05-23T11:37:30Z")

</div>

Hi, when testing our SCIM server implementation with the Okta SCIM 2.0 SPEC Test, there’s one assertion failing in the step which tests the unauthorized request response.

It seems that there’s a bug in the assertion which I guess was meant to check if the response body has the proper schema `urn:ietf:params:scim:api:messages:2.0:Error`, but it assumes that `schemas` is a single value, when according to the SCIM spec it’s always a list:

 ![image](https://global.discourse-cdn.com/oktadev/original/2X/4/4fba01cd823a3d0f53600522df84cbd06500d42e.png)

When I fill the Property field with `schemas`, the “has value” operator is applied to this list instead of the whole body and then the test passes.

It can be easily spotted in the script when you search for `"property": ""` in the script file:  
[https://developer.okta.com/standards/SCIM/SCIMFiles/Okta-SCIM-20-SPEC-Test.json](https://developer.okta.com/standards/SCIM/SCIMFiles/Okta-SCIM-20-SPEC-Test.json)

It should be changed to `"property": "schemas"` as it is in other schema assertions.

---

<div class="post-metadata">

**Author:** ![alisaduncan](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/alisaduncan/32/3429_2.png) [@alisaduncan](https://devforum.okta.com/u/alisaduncan)\
**Post date:** [May 23, 2024, 2:47pm UTC](https://devforum.okta.com/t/scim-2-0-spec-test-bad-assertion-for-401-response-schema/28432/2 "2024-05-23T14:47:43Z")

</div>

Hi there @adampl !

Thanks for pointing this out! You’re correct, it looks like there’s a typo. I’ll escalate it and get it addressed.

---

<div class="post-metadata">

**Author:** ![alisaduncan](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/alisaduncan/32/3429_2.png) [@alisaduncan](https://devforum.okta.com/u/alisaduncan)\
**Post date:** [May 23, 2024, 7:51pm UTC](https://devforum.okta.com/t/scim-2-0-spec-test-bad-assertion-for-401-response-schema/28432/3 "2024-05-23T19:51:32Z")

</div>

Hello @adampl !

Wonderful news! The awesome Docs team published the fix to the SCIM spec json! You should see the updated property after refreshing your browser on the site.

Thank you so much for taking the time to report this bug; we appreciate it!

---

<div class="post-metadata">

**Author:** ![adampl](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@adampl](https://devforum.okta.com/u/adampl)\
**Post date:** [May 24, 2024, 4:47pm UTC](https://devforum.okta.com/t/scim-2-0-spec-test-bad-assertion-for-401-response-schema/28432/4 "2024-05-24T16:47:03Z")

</div>

Thank you for the quick reaction 🙂

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [May 25, 2024, 4:47pm UTC](https://devforum.okta.com/t/scim-2-0-spec-test-bad-assertion-for-401-response-schema/28432/5 "2024-05-25T16:47:09Z")

</div>

Closed on May 25, 2024, 4:47pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
