You do not have the following permissions on TableData Published Application: IndirectInsert
1. Describe the bug When pressing F5 to Publish and Debug, the error "You do not have the following permissions on TableData Published Application: IndirectInsert for company My Company."
I had a company in my database called "My Company" which was a non-evaluation company. This company was deleted from both the production and sandbox databases. Error still occurred and still referred to the "My Company" company, even though it had been deleted. I deleted the sandbox and created a new one from a copy of production database. Error still occurred even though company was deleted from production and has never existed in sandbox.
My account is the ONLY account in the database and I have the SUPER role.
License = Dynamics 365 Business Central for IWs
Issue has only started happening in the last week or so. Maybe since the last upgrade?
2. To Reproduce Steps to reproduce the behavior: a. AL: Go! and create a new project using default b. Press F5
3. Expected behavior Code should be compiled and deployed to sandbox, allowing for testing.
4. Actual behavior Following steps are undertaken and error message displayed at end.
[2023-05-11 09:15:12.73] Publishing AL application using launch configuration 'Microsoft cloud sandbox'. [2023-05-11 09:15:13.03] Authenticating... [2023-05-11 09:15:14.02] Authenticated. [2023-05-11 09:15:14.02] Authenticated as user '[email protected]'. Please note that these credentials are cached. Clear the credentials cache to authenticate as another user. [2023-05-11 09:15:14.02] Targeting Dynamics 365 Business Central. [2023-05-11 09:15:14.02] Sending request to https://api.businesscentral.dynamics.com/v2.0/Sandbox/dev/metadata [2023-05-11 09:15:18.32] Sending request to https://api.businesscentral.dynamics.com/v2.0/Sandbox/dev/apps?SchemaUpdateMode=forcesync&DependencyPublishingOption=default [2023-05-11 09:15:18.94] The request for path /v2.0/Sandbox/dev/apps?SchemaUpdateMode=forcesync&DependencyPublishingOption=default failed with code UnprocessableEntity. Reason: You do not have the following permissions on TableData Published Application: IndirectInsert for company My Company.
5. Versions:
- AL Language:
- Visual Studio Code: Version: 1.77.3 (system setup) Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710 Date: 2023-04-12T09:16:02.548Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Windows_NT x64 10.0.19044 Sandboxed: No
- Business Central: 22.0.54157.54644
- List of Visual Studio Code extensions that you have installed:
- AL Language Extension
- AZ AL Dev Tools (removed and the issue still occurred)
Repository has been searched. I have found examples of this error but no solutions have worked.
FirstEnvironment = Production (I read somewhere that the problem could be with having an environment with "Production" in the name, so I changed it to FirstEnvironment. This is only being used for development so am happy to delete this if required.) SandboxNew = Sandbox
Only companies are CRONUS NZ and both are marked as Evaluation Company in Companies table.
Unsure exactly what caused this but have updated launch.json file and seems to be ok now. Very odd.
What specifically did the launch.json file need to contain that was previously not there? I've run into the same issue. In this case the error states I don't have that permission for the Cronus company. Which makes zero sense, seeing it's an evaluation company. And I am the primary tenant adnin, and created the BC 365 SaaS environment as the original super user.
I have the same problem. Could you share what updates to the launch.json you did?
What I found was that this was a transient error, occurring after the SaaS environment was automatically updated to a newer version. Usually it takes a full day after the update has completed to be able to consistently push my AL extension updates in via VSCode. It was either a permissions error, an in-use by another session error, etc. that would pop up.