Hi Arkadiusz Kozieł,
I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer.
Issue:
CosmosDB for Tables - authorization using managed Identity and custom role - no required dataAction
Solution:
I found an answer
https://learn.microsoft.com/en-us/azure/cosmos-db/table/security/glossary
Important
Some Azure services, like Azure Cosmos DB, have their own native role-based access control implementation that uses different Azure Resource Manager properties, Azure CLI commands, and Azure PowerShell cmdLets. The commands you typically use to manage role-based access control will not work with Azure Cosmos DB data plane access. Some of the commands for Azure role-based access control may work with Azure Cosmos DB control plane access.
https://learn.microsoft.com/en-us/azure/cosmos-db/table/security/reference-data-plane-actions I was able to assign table level privileges using CLI and json file as described here:
Simply it is something different than IAM visible in Azure Portal :(
And does not work yet with terraform - but there is at least resource:
azurerm_cosmosdb_sql_role_assignment
so maybe in next version there will be something like
azurerm_cosmosdb_table_role_assignment
If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.
Hope this helps. Do let us know if you have any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.