Hello @Enea de Bollivier ,
welcome to this moderated Azure community forum.
A managed identity is used to let one Azure service consume another Azure service.
The consuming service must have a Azure managed identity and on the service that will be consumed, that identity must be granted the right role to access the service.
Your edge module is not an Azure service.
So, a managed identity will not work.
There is two alternatives.
You could work with a 'user assigned managed identity'. This is a bit cumbersome to set up and does not limit the access to individual files.
Another solution is working with SAS token.
For each file you can generate a SAS token that gives access to the file for a certain timespan before it expires. This could be eg. writing or reading or both.
Check this working SAS token example in this blog post. It is combined with a Redis cache but that is just an example.
If the Azure IoT Edge module needs a SAS token, it can ask for it using a specific message. Using an extra Azure function, the SAS token is generated and distributed with a limited lifespan.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.