Azure / Azure/AzureAD-BYOA-Provisioning-Samples

Queries to HostedService scim/users/?filter=externalId%20eq%20bjensen results in 500 error

Open
#23 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
21
Forks
23
PR merge metrics
No merged PRs in 30d

Description

I was finally able to get the SampleProvider working after decompiling the code (seriously, this needs far more extensive documentation and examples than have been provided).

Executing the following query results in 500 error response:

http://localhost:47035/scim/users/?filter=externalId%20eq%20bjensen

I can see the response object, but the serializer in the demo is falling down.

```

An error has occurred.

Type 'Microsoft.SystemForCrossDomainIdentityManagement.QueryResponse' with data contract name 'QueryResponse:http://schemas.datacontract.org/2004/07/Microsoft.SystemForCrossDomainIdentityManagement' is not expected. Consider using a DataContractResolver if you are using DataContractSerializer or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to the serializer.


System.Runtime.Serialization.SerializationException


at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeAndVerifyType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, Boolean verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiTypeAtTopLevel(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle originalDeclaredTypeHandle, Type graphType)
at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
at System.Runtime.Serialization.DataContractSerializer.WriteObject(XmlWriter writer, Object graph) at System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content)
at System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Owin.HttpMessageHandlerAdapter.d__13.MoveNext()

```
How does this contract binding even work? Also, this uri is dead...

'QueryResponse:http://schemas.datacontract.org/2004/07/Microsoft.SystemForCrossDomainIdentityManagement'

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.