A cloud-based identity and access management service for securing user authentication and resource access
Kevin, I had the same problem and was able to get the schema passing by removing the $ref attributes under members. Longer answer/bug report follows.
Microsoft's handling of the members property in a group appears to be quite wrong.
Along with the invalid schema problem described above, if you put properties in your schema for the SCIM validator to discover, it will complain about them:
Internal server error: The attribute members[type eq "User"].$ref for Group is not supported by the SCIM protocol. Please refer to the SCIM RFC
It tells me to refer to the SCIM RFC, but the SCIM RFC quite clearly states these are allowed (see here on page 68):
{
"id" : "urn:ietf:params:scim:schemas:core:2.0:Group",
"name" : "Group",
"description" : "Group",
"attributes" : [
{
"name" : "displayName",
"type" : "string",
"multiValued" : false,
"description" : "A human-readable name for the Group.
REQUIRED.",
"required" : false,
"caseExact" : false,
"mutability" : "readWrite",
"returned" : "default",
"uniqueness" : "none"
},
{
"name" : "members",
"type" : "complex",
"multiValued" : true,
"description" : "A list of members of the Group.",
"required" : false,
"subAttributes" : [
{
"name" : "value",
"type" : "string",
"multiValued" : false,
"description" : "Identifier of the member of this Group.",
"required" : false,
"caseExact" : false,
"mutability" : "immutable",
"returned" : "default",
"uniqueness" : "none"
},
{
"name" : "$ref",
"type" : "reference",
"referenceTypes" : [
"User",
"Group"
],
"multiValued" : false,
"description" : "The URI corresponding to a SCIM resource
that is a member of this Group.",
"required" : false,
"caseExact" : false,
"mutability" : "immutable",
"returned" : "default",
"uniqueness" : "none"
},
{
"name" : "type",
"type" : "string",
"multiValued" : false,
"description" : "A label indicating the type of resource,
e.g., 'User' or 'Group'.",
"required" : false,
"caseExact" : false,
"canonicalValues" : [
"User",
"Group"
],
"mutability" : "immutable",
"returned" : "default",
"uniqueness" : "none"
}
],
"mutability" : "readWrite",
"returned" : "default"
}
],
"meta" : {
"resourceType" : "Schema",
"location" :
"/v2/Schemas/urn:ietf:params:scim:schemas:core:2.0:Group"
}
},
Just by trial and error, it seems the only members property that Microsoft will accept is type. Even value (the most important property) is not acceptable in the schema, although if you include it in your API response, Microsoft will allow it there.
I know the Microsoft preference is to return groups with excludedAttributes=members, which is fine, but that shouldn't exclude the possibility of SCIM implementations behaving in valid and desirable ways when this property is not passed.
I guess my workaround for the time being is to remove $ref and remove most members properties from the schema, but it'd be nice to see this fixed. I assumed the problem was on my end, and sunk quite a few hours into trying to figure out what I was doing wrong before figuring all this out.