'Unable to obtain embedded recipient view from DocuSign

I have integrated DocuSign embedded signing into my web app, which is still in development so using DocuSign developer sandbox.

When an envelope is created programmatically, I am including Name, Email and ClientUserId for the signer like this:

var signers = new List<TemplateRole>();
foreach (var r in req.Recipients)
{
    var signer = new TemplateRole();
    signer.ClientUserId = r.SSOUserId;
    signer.Email = r.Email;
    signer.Name = r.Name;
    signer.RoleName = r.RoleName;
    signer.RoutingOrder = r.RoutingOrder.ToString();
    signer.Tabs = r.MergeFields
    signers.Add(signer);
}

var env = new EnvelopeDefinition() 
{
    TemplateId = ...,
    TemplateRoles = new List<TemplateRole>(signers),
    EventNotification = ...,
    Status = "Sent"
};

When an embedded recipient view is requested, I include the same exact Name, Email and ClientUserId in the request like this:

var envelopeApi = new EnvelopesApi(ApiClient);
var viewOptions = new RecipientViewRequest
{
    ReturnUrl = ...,
    AuthenticationMethod = "Password",
    ClientUserId = recipient.SSOUserId,
    UserName = recipient.Name,
    Email = recipient.Email
};
var viewUrl = envelopeApi.CreateRecipientView(AccountId, DocuSignEnvelopeId, viewOptions);

Even though the user may change their Name and/or Email in my app, I have the original values saved in a table and I use those original values when requesting the view from DocuSign. This setup has worked 100% of the time for many months until now when an envelope is having trouble obtaining a recipient view. The envelope was created + viewed last week (April 27, 2022), and when the user tried to sign it today (May 4, 2022), they keep getting this error:

DocuSign.eSign.Client.ApiException: Error calling CreateRecipientView: {
    "errorCode":"UNKNOWN_ENVELOPE_RECIPIENT",
    "message":"The recipient you have identified is not a valid recipient of the specified envelope."
}

Note that hundreds of envelopes created before and after the above envelope are still able to obtain a recipient view with the exact same code + configuration. The problematic envelope has not expired, I can still see it in the Waiting for Others section of the DocuSign admin site. I have compared its recipient info at DocuSign (by invoking ListRecipients) with the info I have in my database, and the Name, Email, ClientUserId, RoleName, RoutingOrder all match completely. My account is set up to expire envelopes after 120 days, and I am not doing anything during envelope creation to set an expiration date. I have seen many others having this issue but typically their problem is the ClientUserId. My code has that handled, and it works for every other envelope.

The only difference I have seen between this envelope and the others is that ListRecipients results show the affected envelope as having a property

"signatureInfo": {
    "fontStyle": "docusign7",
    "signatureInitials": "RW",
    "signatureName": "Test"
}

that is null for all other envelopes. The documentation states that this property can be set by the sender to pre-fill signature fields. However, I didn't even know about this property before today, so my app has never set it. It would be weird for this property to cause the envelope to be in a state where it cannot be signed anymore but I am struggling to find a reason why this particular envelope cannot be signed. Btw, the signatureName of Test actually matches the Name property of the recipient so its even more confusing why DocuSign is refusing to recognize the signer.



Solution 1:[1]

If the envelope is still active, I suggest doing a Recipients:list operation. Also check that the recipient is a "current" recipient. (If there's only one recipient, then this doesn't apply.)

If the Recipients:list doesn't give you any clues then I suggest you contact developer support. They can check our backend logs to see if there's additional information on why the RecipientsView call didn't work.

See page https://support.docusign.com/s/contactSupport?language=en_US First login to that page if you have a production account. You can get support if you only have a developer account.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Larry K