Hi,
As per tests Azure Container apps only supports getting tokens via the IMDS metadata/identity/oauth2/token endpoint. In other words, Instance isn't supported but this is metadata/identity/oauth2/token
supported
So basically command which should work
curl -v -s -H Metadata:true http://169.254.169.254/metadata/identity/oauth2/token?resource=https://management.azure.com
The other endpoint categories return 404 error if Identity is enabled for the container, if Identity is not enabled for the container then connections to IMDS will fail as in your example.
If you would like to confirm my results, navigate to your container rapps-- Identity blade in the portal, turn on system-assigned managed identity, Save, wait a minute, then repeat test in your container.
Please click Accept Answer if the above was useful.
Thanks.