Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Consent Required Error When Using RequestJWTUserToken

Tags:

docusignapi

I'm trying to use the DocuSign Rest API to retrieve a completed envelope. When I call RequestJWTUserToken, I get an error that user consent is required. I have the Organization Administration enabled and my application authorized with permissions "extended impersonation signature" (I've tried each individually and get the same error so added all in hopes that this gives me access to everything). I'm using a user who is also an admin.

My understanding from reading the Obtaining Consent documentation is that by using "admin consent for internal applications" and authorizing my application, this grants consent on behalf of all users and I don't need any user interaction. What am I doing wrong?

List<string> scope = new List<string>();
scope.Add(OAuth.Scope_EXTENDED);
scope.Add(OAuth.Scope_SIGNATURE);
scope.Add(OAuth.Scope_IMPERSONATION);


_AccessToken = _ApiClient.RequestJWTUserToken(client_id, "3c524db3-2971-4ed3-80af-45646b52ca5b", OAuth.Demo_OAuth_BasePath, privateKeyBytes, 4, scope);
like image 469
Scott B Avatar asked Sep 22 '26 18:09

Scott B


1 Answers

Admin Consent works if all below conditions are met:

  • As an Org Admin, you have successfully claimed your email domain in DocuSign (this can be done using Domain Tile)
  • The users for whom you want to create an AccessToken also belong to same email domain which you have claimed in DocuSign
  • Added interested scopes "impersonation signature" for your IntegratorKey using Application Tile, extended scope is of no use in JWT scenario.

If you have done all above three steps, then you should be able to generate AccessToken for a user with JWT using Admin Consent.

like image 162
Amit K Bist Avatar answered Sep 24 '26 10:09

Amit K Bist



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!