POST to Create enterprise user returns internal server error 500
See original GitHub issueAfter upgrading from version 2.0.9 to 2.0.15 of SimpleIdServer, I’m getting internal server error 500 response in the creation of a new enterprise user with POST to “/scim/Users” with the following json body:
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
],
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
"department": "sales",
"manager": {
"value": "19d216e6-a2cd-4b1f-a51c-9f98fa1ebc4c"
}
},
"userName": "UserName222",
"active": true,
"displayName": "lennay",
"externalId": "e1f4c134-2dec-4754-bb50-9e786e4ecae9",
"name": {
"formatted": "Andrew Ryan",
"familyName": "Ryan",
"givenName": "Andrew"
},
"emails": [
{
"primary": true,
"type": "work",
"value": "andrew@gmail.com"
},
{
"primary": false,
"type": "home",
"value": "andrewhome@gmail.com"
}
]
}
The token header is also present in the request with “Authorization”: “Bearer …”.
This request is part of an End-2-End test in our solution that uses SimpleIdServer, so the request between both versions is exactly the same.
It seems like a bug was introduced in the recent versions.
The response from the server is:
[2022-08-09T12:19:47.5478801+00:00][EROR][1a3521031592][109][SimpleIdServer.Scim.Api.UsersController] Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at SimpleIdServer.Scim.Helpers.RepresentationReferenceSync.BuildScimRepresentationAttribute(String attributeId, SCIMRepresentation targetRepresentation, SCIMRepresentation sourceRepresentation, String sourceResourceType, SCIMSchema targetSchema)
at SimpleIdServer.Scim.Helpers.RepresentationReferenceSync.UpdateScimRepresentation(SCIMRepresentation scimRepresentation, SCIMRepresentation sourceRepresentation, String attributeId, String resourceType, SCIMSchema targetSchema, Boolean& isAttrUpdated)
at SimpleIdServer.Scim.Helpers.RepresentationReferenceSync.AddReferenceAttributes(RepresentationSyncResult result, IEnumerable`1 ids, SCIMAttributeMapping attributeMapping, SCIMRepresentation sourceScimRepresentation, String location, SCIMSchema targetSchema)
at SimpleIdServer.Scim.Helpers.RepresentationReferenceSync.Sync(IEnumerable`1 attributeMappingLst, String resourceType, SCIMRepresentation oldScimRepresentation, SCIMRepresentation newSourceScimRepresentation, String location, Boolean updateAllReferences, Boolean isScimRepresentationRemoved)
at SimpleIdServer.Scim.Helpers.RepresentationReferenceSync.Sync(String resourceType, SCIMRepresentation oldScimRepresentation, SCIMRepresentation newSourceScimRepresentation, String location, Boolean updateAllReferences, Boolean isScimRepresentationRemoved)
at SimpleIdServer.Scim.Commands.Handlers.AddRepresentationCommandHandler.Handle(AddRepresentationCommand addRepresentationCommand)
at SimpleIdServer.Scim.Api.BaseApiController.InternalAdd(RepresentationParameter jobj)
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
HTTP 500 Internal Server Error: What It Means & How to Fix It
An HTTP 500 internal server error is a general error message. It covers unexpected issues that don't fit into existing error codes. HTTP...
Read more >How to Fix a 500 Internal Server Error on Your Site
The 500 Internal Server Error status code occurs when the server encounters an error that prevents it from fulfilling the request.
Read more >Fixing a 500 internal server error response
A 500 Internal Server Error is an HTTP status code that indicates that the server encountered an unexpected error while processing the request....
Read more >What is “HTTP 500 Internal Server Error” and How to Fix It?
Error 500, also known as the Internal Server Error, is a common HTTP status code that indicates an issue on the web server's...
Read more >'Internal server error 500' error message in Portal for ArcGIS
It appears that when an IIS server issues an 'Internal server error 500' message to end-users, requests do not come from the Web...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello,
Indeed there is a regression in the version 2.0.15. The issue should be fixed now, can-you please try the nuget package : https://www.myget.org/feed/advance-ict/package/nuget/SimpleIdServer.Scim version 2.0.16-ci-00324.
KR,
Sid
SimpleIdServer released v2.0.17 in nuget, but github releases are not yet updated since v2.0.15. Just to let you know in case it was a missing point.