32
Views
1
Comments
Solved
[IdP Customizations] String or binary data would be truncated
Question
idp-customizations
Service icon
Forge asset by João Barata
Application Type
Service

Hi

I'm getting a "String or binary data would be truncated" error when login using Azure AD. This happens because Azure login returns a claim with the user external id that has 79 chars, and it try to store it in the field "External_ID" of the "Users" System table, that only allows 36 characters (check screenshot)

This field is generated by Azure based on some  info, like email, and it can easily get more than 36 chars

The external_Id field shoud have at least the same lenght of the username field

Shoud we clone "Users" application and change the "externalId" lenght, or shoud we just change the component to truncate the external_id claim returned by Azure? 

Let the discussion begin

 



Untitled.png
2020-10-08 19-51-35
João Barata
Staff
Solution

Hi @António Barroso ,

If you are using the default logic of the IdP Customizations component, you should change the component to truncate the value.
It's not advisable to change the ExternalId length since the User table is a System table ( Cloning users will not let you increase the length anyways).

The IdP component version 5.0.1, already has this truncate logic in place, however, due to the nature of the IdP Customizations component, I cannot publish a new version with the fix as that would defeat the purpose of a component where you can add your custom logic without being impacted from changes made on the parent component.

Regards,



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.