Azure AppService KeyVault Seal MSI

I have Vault setup in Azure App Service for Containers. There is User Managed Identity assigned to the application and i have defined the following variables to the app_settings:

AZURE_CLIENT_ID
AZURE_TENANT_ID
VAULT_AZUREKEYVAULT_VAULT_NAME
VAULT_AZUREKEYVAULT_KEY_NAME

When i try to run it with this setup i can see following error on the logs:

2022-09-28T06:19:06.193679594Z Error parsing Seal configuration: error fetching Azure Key Vault wrapper key information: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://xxxxx.vault.azure.net/keys/vaultunsealkey/?api-version=7.0: StatusCode=400 -- Original Error: adal: Refresh request failed. Status Code = '400'. Response body: {"statusCode":400,"message":"Unable to load the proper Managed Identity.","correlationId":"32d17075-90ea-408f-af5a-1b3661acf2d1"} Endpoint http://172.16.2.3:8081/msi/token?api-version=2017-09-01&resource=https%3A%2F%2Fvault.azure.net

If i switch to using SystemAssignedIdentity it works just fine.