New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConfigureJwtAuthorizationFlow throws "PARTNER_AUTHENTICATION_FAILED" when AuthenticationApi.Login() called #170
Comments
Hi Garry, Please try again with the following:
Thank you for the report. If it still isn't working after the above changes, please reply on this thread. Regards, Also, DocuSign is interested in discussing your experiences with the DocuSIgn API and Developer Center with you via a 30-45 minute phone call. As a thank you for your time, we’ll send you a $50 Amazon gift card after the call. Or we can send it to the charity of your choice. If you're interested (and this offer, for a limited time, applies to anyone developing with DocuSign) then please contact me via larry.kluger.docusign@gmail.com (That email address is to help avoid spam, I'll reply from my docusign.com address.) Thank you. |
Thanks for the quick response @LarryKlugerDS I've changed the Unfortunately I get the same message when login() is called. |
One more item: please try with only one backslash before the key's file name. Eg:
Please also check that the private key file is in the "Current" directory returned by the method. Thanks, |
C# requires the double slash as it is an escape character. I changed it to single slash but had to add the @ symbol before the string to ensure that escape characters are ignored, otherwise I would have compiler errors. As you can see from the screenshot below, the paths and file locations are correct. I did have an issue with locating the privateKey file previously, as an error was thrown, but resolved this, so confident that the file path is correct. The privateKey file contains just the private key section that was generated in the DocuSign Admin portal. It starts with |
Ok, thank you. I saw an internal problem report where changing the double slash was the fix. You're correct that the private key file should include the start/end lines you're showing. You do not need the public key file unless you want to disassemble/check the JWT. I will file an internal bug report to engineering on your issue. I'm sorry that you're having these problems. We'll get it sorted out. |
I'm running into the same issue. Debugging through the code the failure is on the oauth/token call in ApiClient. In my case, that call is returning: The subsequent LoginAsyncWithHttpInfo call then throws the exception with "PARTNER_AUTHENTICATION_FAILED" |
Consent can be granted in either of two ways:
Please grant consent and then let us know via this thread if the JWT auth then works. Thank you! |
I did manage to get the client working once I did the Authorization Code Grant! One small complaint about the docs for the granting consent: In the step where you're supposed to request an access token from the code, the request uses a Basic Authorization header but there's no explanation of what credentials to supply. Now I realized fairly quickly that I didn't need to do that step but people may get hung up on it. Thanks for the help! |
I've started to revisit this following some help from support. It appears that to use ConfigureJwtAuthorizationFlow consent must be granted, which I was able to do by using the below URL. account-d.docusign.com/oauth/auth?response_type=code&scope=signature%20impersonation&client_id=integratorkey&redirect_uri=redirecturi Unfortunately, I've now run into another issue when running the code in production in an Azure Web App, the method only accepts the filename of the privatekey and not a path, so it assumes that it is running in the current working directory. In an Auzre Web App, the current working directory is D:\Windows\System32 and not the location of the published files which is D:\home\site\wwwroot where the privateKey.pem is published to. To make matters worse MS do not give you read/write access to the Windows folder (make sense why not tbf) so I can't copy the file into the directory as a quick work around. |
In the library version 2.2.1 onwards, we addressed an issue when using JSON Web Tokens (JWT) authentication and you deploy web apps to Azure. You’d receive a cryptographic error on the ConfigureJwtAuthorization call because it required you to store your private key in a physical file. We added a new method, named ConfigureJwtAuthorizationFlowByKey, which enables you to pass the key value as a string instead and prevent the cryptographic error. You can store your private key in an Azure Key Vault or any other mechanism you choose. |
I am closing this issue, if you are still facing this, please log a new issue. |
Hello, I get the same error when I try to make a call to get the access token Error:
dcsIntegratorKey = Integration key Any thoughts on what could be the issue or how to debug this? Thanks |
I'm following the authentication process against a Developer Sandbox which is documented on the Readme of this repo, but I am getting "PARTNER_AUTHENTICATION_FAILED" on login.
Has anyone got this to work? Most examples I have seen are passing username and password details through the Default Header of the client.
I've used that method in other tests and it works, but it is not desirable to be sending password details in clear text, ok for development not so much for production.
The text was updated successfully, but these errors were encountered: