Share via


Delegation Object report “ACS90013: Object exceeded its maximum length”

In case ACS 2.0 is being implemented and following code is used to create a Delegation object for OAuth 2.0 as below

 Delegation delegation = new Delegation() {

                        NameIdentifier = userName,

                        IdentityProvider = identityProvider,

                        RelyingPartyId = relyingPartyId,

                        ServiceIdentityId = serviceIdentityId,               

                        };

 svc.AddToDelegations( delegation );

An ACS exception message may be returned as follows

 "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\r\n<error xmlns=\"https://schemas.microsoft.com/ado/2007/08/dataservices/metadata\">\r\n <code></code>\r\n<message xml:lang=\"en-US\">ACS90013: Object exceeded its maximum length. Trace ID: 3a0afb00-7ba7-4d38-b91a-558801df0972. Timestamp: 2013-07-15 02:46:51Z</message>\r\n</error>"

 

While the error message is pretty self-explanatory the crucial part is what length will lead to the error. The MSDN document for Delegation doesn’t specify what is the maximum length of the string that can be assigned to “NameIdentifier” and “IdentityProvider.   

I did some debugging (yeah I work at Microsoft CSS so I can do funny stuff ) and found that when we create a Delegation object we can have max length of 256 characters for both “NameIdentifier” and “IdentityProvider".  

So keep the length of the strings lower than 256 and the error will not show up. So check for the length of the variables being assigned to “NameIdentifier” and “IdentityProvider” to avoid the error ACS90013: Object exceeded its maximum length.

 

Angshuman Nayak , Escalation Services, Cloud Integration Engineering