Hello Chunhui You,
It looks like you are trying to use the system assigned identity to get the access token to use on the Azure AI service API call. Like this example:
First I suggest to verify the endpoint url and the procedure itself, here an example using Service principal that also can help you to setup your call on function app:
https://learn.microsoft.com/en-us/azure/ai-services/authentication?tabs=powershell#sample-request
You can follow this documentation:
- https://learn.microsoft.com/en-us/azure/ai-services/translator/reference/v3-0-reference#authentication
- https://learn.microsoft.com/en-us/azure/ai-services/translator/reference/v3-0-reference#authentication
Please take a look on the information shared and reach out again if you need more assistance.
Luis