Forum Discussion

BHS's avatar
BHS
Brass Contributor
Mar 18, 2026

Question about barCode.scanBarCode

Dear sir

I'm developing Teams mobile application, static tab(Personal app Tab).
We need a QR scan feature. However I can't use that.

barCode.isSupported() is always false.

Is there any restriction on static tab app?

 

Here are my conditions.

-. "import { app, authentication, barCode } from '@microsoft/teams-js';" . version : 2.37.0

-. manifest.json : "devicePermissions": ["media"],

-. app.initialize() is sucessfully done. I can see the barCode object

Unfortunatly, barCode.isSupported() shows false.

Android, iOS has the same result.

Can you advise how  I can use the barCode camera.?


Many thanks

 

2 Replies

  • Hi BHS​

    according to the official documentation, Microsoft Teams support for QR or barcode scanner functionality is only available on mobile clients. However, there is no explicit mention of whether this feature is supported specifically for Static Tabs (Personal App Tabs).

    We noticed that the sample provided in the documentation also uses a Personal Tab. Could you please try running this sample (Microsoft-Teams-Samples/samples/TeamsJS/tab-product-inspection at main · OfficeDev/Microsoft-Teams-Samples) on your end and let us know if it works for you?

    • BHS's avatar
      BHS
      Brass Contributor

      Dear Sir 

      Thank you for your reply

      Yesterday, I found barCode module is beta(... "Do not use this API in a production environment.")

      (https://learn.microsoft.com/en-us/javascript/api/%40microsoft/teams-js/barcode?view=msteams-client-js-latest&viewFallbackFrom=msteams-client-%E2%80%A6).

      Instead, I can successfully scan a QR code by using the existing media.scanBarCode.
      However, It has another issue . API deprecated (https://learn.microsoft.com/en-us/javascript/api/@microsoft/teams-js/media?view=msteams-client-js-latest)ㅇ

      I wonder if MS Teams will provide a sufficient grace period for a gradual migraition

      Many thanks

      BHS