OfficeDev/teams-toolkit

teamsApp/extendToM365 error with NotImplementedError

brijshah2709 opened this issue · 6 comments

Describe the bug
When using command teamsApp/extendToM365 the command throws below error.

{
  "errorType": "SystemError",
  "source": "Fx-VS",
  "name": "NotImplementedError",
  "message": "Not implement the method: M365 get token scopes: https://titles.msit.mos.microsoft.com/.default",
  "stack": null,
  "innerError": null,
  "userData": null,
  "timestamp": "2024-06-25T08:44:10.6188838-07:00",
  "displayMessage": "Not implement the method: M365 get token scopes: https://titles.msit.mos.microsoft.com/.default",
  "helpLink": null,
  "issueLink": null
}

To Reproduce
Steps to reproduce the behavior:

 # Validate app package using validation rules
 - uses: teamsApp/validateAppPackage
   with:
       # Relative path to this file. This is the path for built zip file.
       appPackagePath: ../../../apps/teams/dist/manifest-metaos/CopilotForSales_MetaOSAppPackage_local.zip

 # publish the app to the tenant app catalog
 # this is only a one-time operation that will throw an error "app with this id already exist" next time
 - uses: teamsApp/extendToM365
   with:
       appPackagePath: ../../../apps/teams/dist/manifest-metaos/CopilotForSales_MetaOSAppPackage_local.zip
   writeToEnvironmentFile:
      titleId: M365_TITLE_ID # Required. The ID of M365 title.
      appId: M365_APP_ID # Required. The app ID of M365 title.

Expected behavior
Command should run without error and deploy to https://admin.microsoft.com/#/Settings/IntegratedApps

Using VS teams toolkit not VS code

Is there perhaps any pre-requisite to run extendToM365? not seeing much info on https://aka.ms/teamsfx-actions/teamsapp-extendToM365

Hi, which VS version are you using? Can you try to update your VS and try again?

@xiaolang124 I am already using latest version of VS and getting this error consistently

image

Normally, this value should be included in the toolkit, but it can be overwritten by an environment variable. You can check if the environment variables 'SIDELOADING_SERVICE_ENDPOINT' and 'SIDELOADING_SERVICE_SCOPE' exist on your machine and delete them to see if it resolves the issue. I will investigate this further.

If you don't need the extendToM365 action, you can just comment it out and try again.

After adding env variables for SIDELOADING_SERVICE_ENDPOINT and SIDELOADING_SERVICE_SCOPE issue was fixed. It would be nice to have this documented or figure out automatic overriding.

Normally you do not need to set SIDELOADING_SERVICE_ENDPOINT and SIDELOADING_SERVICE_SCOPE environment and it will work as well.