Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

AuthorizationUnsuccessful when using an account other than app creator

Started by Liam Burns -   in API Authentication

We have created a Xero app to access a company's bank account details.

The flow is:
1. User logs into Xero
2. User selects the Xero organisation to grant access to the app
3. Xero returns an access token, refresh token and id_token
4. The app can then pull the bank account details from the Xero organisation using this end point https://api.xero.com/api.xro/2.0/Accounts

The app is created by User A. When User A completes the flow it works perfectly. When User B (or any other user) completes the flow it does not pull the bank account details and we receive the following error:

"Type": null,
"Title": "Unauthorized",
"Status": 401,
"Detail": "AuthorizationUnsuccessful",
"Instance": "8460e29e-bcfc-4402-9904-504986aa9b4c",
"Extensions": {}

User B has all the permissions needed to grant access. The response from Xero is the same for both users e.g. the access token is the same for both users but it works for the app creator (User A) but not for others users such as User B.
any resolution? I am having the same problem

Colonial Family Eyecare