To resolve the issue with the Teams transcription API, you need to convert your public app into a confidential app. A confidential app is typically used for server-to-server communication and requires a client secret or certificate for authentication.
Here are the steps you can follow to create a confidential app:
- Register a New Application: Go to the Azure portal and register a new application. Ensure that you select the option for a confidential client.
- Configure Permissions: Assign the necessary permissions for accessing the Teams meeting transcripts. You may need to use application permissions instead of delegated permissions to avoid limitations on the number of transcripts you can fetch.
- Generate Client Secret: After registering the app, generate a client secret. This secret will be used in your application to authenticate against the Microsoft identity platform.
- Update Your Application: Modify your application code to use the new client ID and client secret for authentication. Ensure you are using the appropriate libraries, such as MSAL (Microsoft Authentication Library), to handle the authentication flow.
- Test the API Calls: Once the application is configured, test the API calls again to see if the issue with the 402 error persists.
By following these steps, you should be able to transition from a public app to a confidential app and resolve the metered usage issue with the Teams transcription API.
References: