New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
403 Forbidden on all tables already present in an Azure SQL DB #11544
Comments
Hi, would you be able to share the application logs instead? It might have more clues on what's happening compared to the one shown in the App, since normally certain errors aren't display to the end users for security purposes. On top of that, perhaps you can also enable set the |
Hi @azrikahar, Here below the log fragment that generates the error. ################################ |
In your first screenshot, it seems like there are no fields, which does seem odd as it should at the minimum show the primary key field. Can you confirm whether the table do not have any columns at all, or they are not displayed here? This might not be related at all, but is there a chance where the database user you are using only has limited permission? |
@azrikahar : I confirm you the tables contains many fields. Simply they are not shown in directus. The tables contain a composed primary key (i.e. 2 columns together forms the primary key) and they are system versioned. The user is db_admin so for sure it is not an issue of permissions. |
Directus does not support tables with composed primary keys. When starting your server, you should have seen messages along the lines of: This is the reason why you have an error message when trying to access them. This is not a bug in itself - but I believe you should not be seeing them at all in the app in order to avoid such confusion. |
I'll close this for now, as compound primary keys is not something Directus currently supports. We can keep the discussion around compound keys going on #7721 🙂 |
Preflight Checklist
Describe the Bug
Environment
WebApp: Docker container in Azure web app (latest directus version)
Database: Azure SQL Standard consumption plan
All the tables already present in an Azure SQL Database are visible in the Settings -> Data Model session of the app but in the Content session a Forbidden error appears.
No other issues if you create tables from scratch within the Directus webapp.
To Reproduce
Install directus in Azure and attach an Azure DB with tables already present in the db.
Errors Shown
Forbidden in the Content session
What version of Directus are you using?
Latest
What version of Node.js are you using?
Embedded in azure
What database are you using?
Azure SQL
What browser are you using?
Chrome
What operating system are you using?
Linux
How are you deploying Directus?
Azure
The text was updated successfully, but these errors were encountered: