0

I am trying to pull geolocation details using a custom application from within Teams. Things work fine when I am logging to teams in browser but same thing dosen't work in Desktop application.

Any suggestion what is going wrong, below is the code and error

navigator.geolocation.getCurrentPosition(function (position) { logger.debug("geolocation : Your current position is Latitude: " + position.coords.latitude + ", " + "Longitude: " + position.coords.longitude ); }, function (error) { logger.debug("geolocation : ERROR = " + error.code + ", message = " + error.message ); }, { timeout: 30000, enableHighAccuracy: true, maximumAge: 75000 } );

Below error is coming :

ERROR = 2, Network location provider at 'https://www.googleapis.com/' : ERR_HTTP_RESPONSE_CODE_FAILURE.

I have enabled all the permission from Teams and system level, still error is coming.

1 Answers1

0

The navigation.geolocation.getCurrentPosition() API isn't currently supported in the Teams Desktop Client.

Reference Document-https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/device-capabilities/native-device-permissions?tabs=mobile%2Cteamsjs-v2%2Cmobile1#use-teams-apis-to-get-device-permissions

enter image description here

Sayali-MSFT
  • 373
  • 2
  • 6