How to fix mediaInitializationFailure: Media platform failed to initialize and 'Could not find a matching certificate for thumbprint'

Khadeer 0 Reputation points
2024-06-14T06:42:04.5866667+00:00

Hi I am trying to run https://github.com/microsoftgraph/microsoft-graph-comms-samples/tree/master/Samples/PublicSamples/EchoBot locally using ngrok free account. Since we need to tunnel both HTTP and TCP ports so used cloudfare.

Using cloudfare created two tunnels for the domain. Created a PFX certificate and got Thumbprint for the certificate.

While running the echo bot locally, I am getting below error:

mediaInitializationFailure: Media platform failed to initialize and 'Could not find a matching certificate for thumbprint'

Attached is the screenshot of the code and error is at builder.SetMediaPlatformSettings(mediaPlatformSettings);

Any help to resolving this error is welcome and also if anyone provides steps to run the echo bot to get audio stream from Teams meeting using ngrok is welcomed

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,311 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,274 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,014 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,342 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Khadeer 0 Reputation points
    2024-06-20T12:41:59.2+00:00

    The issue was due to the certificate was installed for the Current User and the code was referring to the Local Machine. After installing the certificate for local computer the issue got resolved

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.