OfficeDev / Microsoft-Teams-Samples

Welcome to the Microsoft Teams samples repository. Here you will find task-focused samples in C#, JavaScript and TypeScript to help you get started with the Microsoft Teams App!
MIT License
1.01k stars 773 forks source link

Error: botAadApp/create failed due to service management reference #1441

Open yuting1008 opened 1 day ago

yuting1008 commented 1 day ago

I am reproducing https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/msgext-expert-finder-js. When setting up resources, I fail to run the app in a Teams web client.

(×) Error: botAadApp/create failed. (×) Error: Service management reference is required when creating Microsoft Entra app in Microsoft tenant. Please refer to the help link to provide a valid service management reference. (!) Warning: botFramework/create was not executed. (!) Warning: teamsApp/validateManifest was not executed. (!) Warning: teamsApp/zipAppPackage was not executed. (!) Warning: teamsApp/validateAppPackage was not executed. (!) Warning: teamsApp/update was not executed. (!) Warning: teamsApp/extendToM365 was not executed.

Below is the botAadApp/create.

  # Create or reuse an existing Azure Active Directory application for bot.
  - uses: botAadApp/create
    with:
      # The Azure Active Directory application's display name
      name: expert-finder-${{TEAMSFX_ENV}}
    writeToEnvironmentFile:
      # The Azure Active Directory application's client id created for bot.
      botId: BOT_ID
      # The Azure Active Directory application's client secret created for bot.
      botPassword: SECRET_BOT_PASSWORD

How to fix this issue? Thank you!

microsoft-github-policy-service[bot] commented 1 day ago

Hi @yuting1008! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

sayali-MSFT commented 1 day ago

@yuting1008 - Thank you for your inquiry about your Teams app development issue! We will check this at our end and will get back to you.

yuting1008 commented 1 day ago

I try to follow Case 2 solultion in the help link that the error message provides.

image

This is what I have done:

  1. Update teamsapp.yml and teamsapp.local.yml files to use aadApp/create action
  2. Add BOT_OBJECT_ID to env/.env.{name} after updated the yaml file
  3. (I am not sure what "provide service tree ID" means in the instruction.)

But it doesn't work. The error message is as below.

(×) Error: aadApp/create failed. (×) Error: Service management reference is required when creating Microsoft Entra app in Microsoft tenant. Please refer to the help link to provide a valid service management reference.