to get a personalized navigation.
to get a personalized navigation.
Hey,
How are we suppose to see what companies are accessible when we use client credentials?
According to the docs availableCompanies aren't supposed to work with client credentials, but then the only way to see what companies are available is to authenticate using a user context to check what companies the client credentials have access to.
https://docs.business.visma.net/docs/schema/queries/companies
Solved! Go to Solution.
That is correct. Fetching available customers and companies do not work when using an access token with client credentials grant type.
This is something we are working on.
Hey,
Do you have a timeline for this?
Hi @omelhus, the goal is to have this in production in week 30.
Is this in prod now?
No, it is not, but I expect it to be at the end of next week (as we currently have weekly releases).
Hey! Will this be released this Thursday?
Hi, this should be released to production now.
Cool, but I'm getting a new error now.
{
"errors": [
{
"message": "Could not fetch the list of available companies. Customer number is mandatory."
}
],
"data": {
"availableCompanies": null
},
"extensions": {
"vbnxt-trace-id": "000000000000000083b98bacc6b8f94b"
}
}
You need to provide a customer number. There is no other way we can provide this functionality otherwise, for the time being.
Here is the documentation for this feature: https://docs.business.visma.net/docs/schema/queries/companies#service-context
Ok, this was what I meant when I asked if it would "be the same method with the same signature and response", which this clearly isn't. As far as I can see this new functionality serves no purpose over what we had available before.
Any plans for implementing availableCustomers for services?
`availableCustomers` now works for client credentials tokens too. There are several other changes mentioned here: https://docs.business.visma.net/docs/releasenotes#20230105
Thank you, thank you, thank you, thank you!!
Ok, I managed to find the correct customer number using availableCustomers in a user context, but this is not available in the service context.
I don't really understand what problem this is suppose to solve? I need to see what companies my service has access to (without brute-force), and this is still not possible.
Unfortunately, we are not able to provide a better solution and this is because of reasons that are beyond our team. I am not saying a solution in the future is not possible but it requires new infrastructure/services that will take a while to develop.
The workaround for now is that you use a user context login to fetch the available customers and then store their IDs somewhere and use it to query for available companies.
What kind of solution do you develop where the list of available customers changes often?
Ok, I'll just have to add an additional setup layer then.
I'm working on a bank-integration (like Autopay). It would be cool to just be able to give the client access, and off it goes.
Just to verify. It will be the same method with the same signature and response that will be used here? Just so I know that I can mock this for a couple of weeks.
Yes, of course. There will be no changes in the schema for this.
Copyright © 2022 Visma.com. All rights reserved.