[IdP] Error in IdP - String or binary data would be truncated
Web icon
Forge component by João Barata

Works or most of the users but for a specific user, failed to sign in with Azure AD account

Encounter error - "String or binary data would be truncated", as shown below in module "IdP"

I tried to open the extension "SAML_Utils" but got compilation error in Integration Studio:

Full error message:

.NET Compilation.

SAML_Utils.cs(297,17): warning CS0618: 'X509V3CertificateGenerator.SetSignatureAlgorithm(string)' is obsolete: 'Not needed if Generate used with an ISignatureFactory' 

SAML_Utils.cs(326,35): warning CS0618: 'X509V3CertificateGenerator.Generate(AsymmetricKeyParameter, SecureRandom)' is obsolete: 'Use Generate with an ISignatureFactory' 

SAML_Utils.cs(350,70): warning CS0618: 'PrivateKeyInfo.PrivateKey' is obsolete: 'Use 'ParsePrivateKey' instead' 

SAML_Utils.cs(355,31): warning CS0618: 'RsaPrivateKeyStructure.RsaPrivateKeyStructure(Asn1Sequence)' is obsolete: 'Use 'GetInstance' method(s) instead' 

SAML_Utils.cs(344,21): warning CS0162: Unreachable code detected 

SAML_Utils.cs(584,78): warning CS1573: Parameter 'ssTimespanThreshold' has no matching param tag in the XML comment for 'CssSAML_Utils.MssSAML_ParseLogoutResponse(string, int, bool, bool, string, string, string, byte[], out RCSAMLValidationRecord, out RCLogoutResponseRecord)' (but other parameters do) 

 SAML_Utils -> C:\Users\User1\AppData\Local\Temp\31ed1c87-1318-4f15-940c-daaa6208af03\Source\NET\bin\OutSystems.NssSAML_Utils.dll

C:\Users\User1\AppData\Local\Temp\31ed1c87-1318-4f15-940c-daaa6208af03\Source\TestApp\app.config : error MSB3249: Application Configuration file "app.config" is invalid. Could not find file 'C:\Users\User1\AppData\Local\Temp\31ed1c87-1318-4f15-940c-daaa6208af03\Source\TestApp\app.config'. 

Anyone come across the same error? Need advice. Much appreciated



Hi George,

From my experience, there was a field/value from the Claims Definition were in it's longer that the field length in Users table for auto create option.

Hope this helps.

Thank you and kind regards,


Thanks, @Chris,

Just wondering how you fix this issue? 

Given I'm having issues to compile the .net code in integration studio, I guess the only option is to customize the user module to increase the affected column size to absorb the longer string?



HI All,

Just to follow up this thread. 

Any advice how to fix this issue?

Any advice how can I compile the SAML_Utils extention?


George Qiao

Hi George,

Referring to the "String or binary data would be truncated" error, during the time that I was debugging the app, I found my issue on this server action:

were in the Username from Azure is longer than the External_Id field. Since I was just doing some proof of concept for my team, I didn't bother doing some adjustments with the said field. 

If you will uncheck the "Automatic User Provision", the creation will be skipped.

Also, I didn't come to a point to open the SAML component in the integration studio.

Thank you and kind regards.


Thanks for the info, Chris.

Hi all,

I found the same issue. My IdP component version is shown in following

1. IdP 5.0.0 

2. IdP Mobile 2.3.1

In my case, I use addMobileToken action to trigger this issue (String or binary data would be truncated). I think this action is the root cause. How I can solve it ?

On the other hand, can you share more information about when this problem will be solved ?

I hope to tackle this issue as I apply this component in my business activity. My deadline is coming soon. 

Thank you for watching.

Best Regards.

Chris Mok

Hi @Hoi Tak Mok ,

If you update the IdP Component to version 5.0.7+ you should have the issue solved.


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