Salesforce

Setting up OAuth 2.0 - What does this error mean: "U hebt geen toegang tot subadministratie"

Article Information
 
Inhoud van het artikel
This article is part of the article serie Setting up OAuth 2.0 - Introduction

This error will occur when the organisation code is included in the soap header instead of the company (office) code.

An example of the soap header which will result in this error:
   
<env:Header>
        <Header xmlns="http://www.twinfield.com/">;
            <AccessToken>91e879b289db22dfec4ed2e6fbd116ec</ns2:AccessToken>
            <CompanyCode>TWINAPPS</ns2:CompanyCode>
            <CompanyId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"" xsi:nil="true"/>
        <Header>
    </env:Header>

De value "TWINAPPS" in this example refers to the organisation code, but not the office code.

Solution
Use the office list function first to create a list of all the offices that the API user has access to:
<list>
   <type>offices</type>
</list>

It is mandatory to include the company code in the soap header with any other soap call then the list offices call.
detail information
1-12-2021 10:32
Setting up OAuth 2.0 - What does this error mean: "U hebt geen toegang tot subadministratie"
175
URL
Setting-up-OAuth-2-0-What-does-this-error-mean-U-hebt-geen-toegang-tot-subadministratie

Powered by