Hello,
Welcome to our Microsoft Q&A platform!
If you want to get the Microphone setting for the entire computer, there is no api can achieve it in UWP.
But if you want to get microphone permission status for your app, it is feasible.
First you need to accept the Microsoft Privacy Policy granting permission for your app to use it. Set the Microphone device capability in the manifest file and when run the app, it will show a system dialog requesting permission about Microphone, clicks Yes and then your app has access to the microphone. In that case, you can try the following code to check if Microphone is disable. If microphone permission is off, then the method will throw System.UnauthorizedAccessException, you can set IsMicAvailable as false when catching the exception.
bool IsMicAvailable = true;
try
{
MediaCapture mediaCapture = new MediaCapture();
var settings = new MediaCaptureInitializationSettings();
settings.StreamingCaptureMode = StreamingCaptureMode.Audio;
await mediaCapture.InitializeAsync(settings);
}
catch (Exception exception)
{
IsMicAvailable = false;
}
if (IsMicAvailable)
{
//do something
}
else
{
//do something
}
}