question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

POST to Create enterprise user returns internal server error 500

See original GitHub issue

After 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:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
simpleidservercommented, Aug 9, 2022

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

0reactions
LazaroOnlinecommented, Sep 20, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found