Getting 500 - Internal Server Error for authentication API

We are getting internal server error with the below error response. But unfortunately, with the same credentials the legacy API seems to be working. We are bit stuck with this and any help would be appreciated.



“grant_type”: “password”,
“username”: “”,
“password”: “P@ssw0rd”,
“scope”: “openid offline_access”,
“client_id”: “6A4fnYcBItDCLiej2gVrfWhfJBUsikdI”,

Response: 500

“error”: “server_error”,
“error_description”: “claim.replace is not a function”

We were able to trace the underlying cause of this situation; part of the logic responsible for returning user claims for that particular request was assuming a profile property would always be a string and the profile details of your user had a non-string value for that property. The situation was addressed and you should no longer see the issue once the fix is deployed (it can take some time to be available).