Hi @ibocon
SQL DB Contributor role allows an identity to manage the SQL Server but does not give the access to the data contained with the databases.
You need to create a contained db user in Azure SQL database and grant permissions as per the link below:
https://learn.microsoft.com/en-us/azure/app-service/tutorial-connect-msi-sql-database?tabs=windowsclient%2Cef%2Cdotnet#grant-permissions-to-managed-identity