Hi @Gagandeep Singh,
Adding the default GUID (00000002-0000-0000-c000-000000000000) to your Azure Function's allowed audience may allow tokens intended for Microsoft Graph or other services to access your function, posing a security risk. It's better to specify a more targeted audience and scope in the token request, ensuring the token is meant for your application or API. In Azure AD v2.0, you can specify custom scopes to ensure the token is valid for your function and more securely manage authentication, instead of relying on the default GUID.
For further clarification, please refer to the following documentations:
- Manage tokens for Zero Trust
- Acquire and cache tokens using the Microsoft Authentication Library (MSAL)
I hope this helps resolve your issue. Feel free to reach out if you have further concerns.