You are viewing limited content. For full access, please sign in.

Question

Question

Self Hosted Rest API 9010 Access Denied

asked on November 9, 2022

I am using Postman to connect to the Laserfiche self-hosted API by performing the following actions.

 

  1. I perform an HTTP POST to https://mysandbox/LFRepositoryAPI/v1/Repositories/Sandbox/Token
  2. In the body, I pass
    1. grant_type = password
    2. username = my username
    3. password = my password
  3. I successfully generate an access token
  4. I perform an HTTP GET to https://mysandbox/LFRepositoryAPI/v1/Repositories/Sandbox/Entries/123
  5. In the headers, I pass
    1. Authorization = Bearer {my access token}
  6. I get back a 9010 access denied "user account name or password is incorrect"

 

I can replicate the same behavior on the API swagger page on the server by

  1. Using the Token api call to generate an access token
  2. Clicking the authorize button at the top right and supplying the access token
  3. Using the Entries api call

 

My user account has full access rights to this entry and all entries in the repository.

 

Any thoughts?

0 0

Replies

replied on November 9, 2022 Show version history

Sounds like an escaping issue. Did you try these username formats?

  • YOURDOMAIN\username
  • YOURDOMAIN\\username   (double the backslash to escape it if needed)
  • username@yourdomain.com

 

Also, you can test using swagger: https://<YOUR API SERVER HOSTNAME>/LFRepositoryAPI/swagger/index.html#/Token/CreateAccessToken

1 0
replied on November 9, 2022

If I use the local admin user, it works.  If I use any AD account, it does not, even if that AD account is licensed with full access rights (and full feature rights).

0 0
replied on January 25, 2023

Is there any progress or fix for this yet? I'm seeing the same issue.

0 0
replied on January 25, 2023

Hi, I would like to confirm if you are able to get the access token from the Self-Hosted Api Server. 

When you call the following API to get an access token, https://<YOUR API SERVER HOSTNAME>/LFRepositoryAPI/v1/Repositories/<YOUR REPOSITORY NAME>/Token, is the access token returned or are you getting a 9010 access denied error?

If you are getting the error, what user type are you using? (Laserfiche user, Windows account user, etc.) Have you tried following the above suggestion from Paolo with the other username formats?

  • YOURDOMAIN\username
  • YOURDOMAIN\\username   (double the backslash to escape it if needed)
  • username@yourdomain.com

Have you also tried calling the API from swagger? The url will be like https://<YOUR API SERVER HOSTNAME>/LFRepositoryAPI/swagger/index.html#/Token/CreateAccessToken

0 0
replied on January 25, 2023

Hi Jason, I am using the swagger interface to send the requests. I am able to get an access token by hitting the Token endpoint. 
 

The user type is a Windows AD login. The only way I can get the access token is with the DOMAIN\username login. If I try the double backslash I get an incorrect username error.

After I get the access token, I try using it to get Entries but I get the 9010 error code. The bearer token looks correct in the request header. 

0 0
replied on January 25, 2023

Hi Greg, please summit a support case with your environment details.

replied on January 26, 2023

Where can I go to submit a support ticket?

0 0
replied on January 26, 2023

Hi, please contact your Laserfiche reseller to open a support case.

0 0
replied on February 27, 2023

This issue should be resolved in version 1.1 of the Self-Hosted Laserfiche API Server. The download link to install version 1.1 can be found here, https://developer.laserfiche.com/api/server/index.html, under the "Installation steps" section. 

1 0
replied on February 28, 2023

That did resolve the issue for us. Thanks for the fix.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.