Mithun Greetings!
Could you share the complete error logs?
This 401 error message indicates that your authentication credentials are invalid. This could happen for several reasons, such as:
- Using a revoked API key.
- Using a different API key than one under the requesting organization.
- Using an API key that does not have the required permissions for the endpoint you are calling.
To resolve the issue, make sure that you are using the correct endpoint and authentication process to connect to the API.
Also, see Authenticate the client and Build an Azure AI chat app with .NET for more information.
Do let me know if that helps.