Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to make API call to Developer Portal #13095

Open
iwaldman opened this issue Jan 21, 2025 · 3 comments
Open

Unable to make API call to Developer Portal #13095

iwaldman opened this issue Jan 21, 2025 · 3 comments
Labels
needs attention This issue needs the attention of a contributor.

Comments

@iwaldman
Copy link

Note
Adding this issue at the request of the Microsoft moderator at https://learn.microsoft.com/en-us/answers/questions/2149114/unable-to-make-api-call-to-developer-portal.

Overview
I am working this tutorial https://learn.microsoft.com/en-us/training/modules/copilot-message-extension-plugins/4-exercise-create-a-message-extension and getting the following error when trying to prepare the resource by running Prepare Teams App Dependencies in Visual Studio 2022.

Output

Executing lifecycle provision
Executing action teamsApp/create in lifecycle provision

Failed to Execute lifecycle provision due to failed action: teamsApp/create. DeveloperPortalAPIFailedSystemError:Unable to make API call to Developer Portal: API failed, self-signed certificate in certificate chain, API name: create-app, X-Correlation-ID: undefined. This may be due to a temporary service error. Try again after a few minutes. . Env output: {}

Execution summary:

Summary:

(×) Error: Lifecycle stage provision failed.

(×) Error: teamsApp/create failed.

(×) Error: Unable to make API call to Developer Portal: API failed, self-signed certificate in certificate chain, API name: create-app, X-Correlation-ID: undefined. This may be due to a temporary service error. Try again after a few minutes.
(!) Warning: aadApp/create was not executed.

(!) Warning: aadApp/update was not executed.

(!) Warning: arm/deploy was not executed.

(!) Warning: file/createOrUpdateJsonFile 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.

Expected
Summary:
(√) Done: Lifecycle stage provision was executed successfully.
(√) Done: teamsApp/create was executed successfully.
(√) Done: Teams app acd471e4-41e3-4da7-8c47-6e25141a5514 created successfully
(√) Done: aadApp/create was executed successfully.
(√) Done: Created Microsoft Entra application with object id c4371c00-491e-406d-a6c5-d79dea1bdba5
(√) Done: Generated client secret for Microsoft Entra application with object id c4371c00-491e-406d-a6c5-d79dea1bdba5
(√) Done: aadApp/update was executed successfully.
(√) Done: Applied manifest ./infra/entra/entra.bot.manifest.json to Microsoft Entra application with object id c4371c00-491e-406d-a6c5-d79dea1bdba5
(√) Done: arm/deploy was executed successfully.
(√) Done: file/createOrUpdateJsonFile was executed successfully.
(√) Done: Json file has been successfully generated to ../ProductsPlugin/appsettings.Development.json.
(√) Done: teamsApp/validateManifest was executed successfully.
(√) Done: teamsApp/zipAppPackage was executed successfully.
(√) Done: teamsApp/validateAppPackage was executed successfully.
(√) Done: teamsApp/update was executed successfully.
(√) Done: Teams app acd471e4-41e3-4da7-8c47-6e25141a5514 updated successfully
(√) Done: teamsApp/extendToM365 was executed successfully.
(√) Done: Microsoft 365 title acquired successfully (U_6e76353e-b0af-1989-79c8-c64cf329750a).
10/10 actions in provision stage executed successfully.
Teams App dependencies are set up, you can click debug or press F5 to continue.

Details
I am using my work PC and suspect that our firewalls or other security software may be blocking the self-signed certificate.

Visual Studio 2022 Preview
Windows 11

Image

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Jan 21, 2025
Copy link

👋 Hi @iwaldman,

Thank you for reporting this issue! We want to let you know that:

⏱️ Our team will personally review your issue
🎯 You can expect a response within 2 business days

✨ This is an AI-generated initial response
🤖 AI-Generated Preliminary Analysis:

From the provided error message, it appears that the problem is related to a self-signed certificate in the certificate chain when making an API call to the Developer Portal. This usually indicates that the issue might be related to your network configuration, specifically, the presence of a firewall or other security software that is interfering with the connection.

Steps to Resolve

  1. Check Network Configuration:

    • Since you mentioned using a work PC, it is likely that your network is behind a corporate firewall or proxy that is intercepting SSL/TLS traffic and replacing certificates with its own self-signed certificate. You need to configure your environment to trust this certificate.
  2. Add Self-Signed Certificate to Trusted Root:

    • Locate the self-signed certificate used by your company's proxy/firewall.
    • Add this certificate to the trusted root certificate authorities on your machine. Here's how you can do it:
      1. Open the Run dialog (Win + R), type certlm.msc, and press Enter to open the Certificate Manager.
      2. Navigate to Trusted Root Certification Authorities -> Certificates.
      3. Right-click and choose All Tasks -> Import.
      4. Follow the wizard to import the certificate.
  3. Set up Proxy Configuration:

    • If you are behind a proxy, ensure that Visual Studio and your environment are configured to use the proxy.
    • You can set the proxy settings in Visual Studio by navigating to Tools -> Options -> Environment -> Web Browser -> Proxy Settings.
  4. Bypass SSL Verification (Temporary Solution):

    • As a temporary workaround (not recommended for production), you can bypass SSL verification. This can be done by setting an environment variable:
      set NODE_TLS_REJECT_UNAUTHORIZED=0
    • Note: This is not a secure practice and should only be used for debugging purposes.
  5. Retry the Operation:

    • After making the above changes, retry the Prepare Teams App Dependencies step in Visual Studio.

Additional Resources

For more detailed context and further updates, refer to the original Stack Overflow question: AppStudioPlugin.DeveloperPortalAPIFailed after upgrading Teams Toolkit to 4.2.0.

If the issue persists after trying these steps, please provide additional details about your network configuration and any error messages you receive. This will help in providing a more targeted solution.

Here is the error code for reference: DeveloperPortalAPIFailedSystemError.

Feel free to reach out if you need further assistance!


Note: This is an automated first response generated by AI. A human team member will review your issue and provide a more detailed response soon. We appreciate your patience!

@Meghana-MSFT
Copy link

Hi @iwaldman - Thank you for reporting this, we will check this and get back to you.

@therealjohn
Copy link
Contributor

@iwaldman in the meantime, try going to dev.teams.microsoft.com (Teams Developer Portal) and creating an app there as a test. Please let me know if that is successful. This doc has information on using TDP: https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/manage-your-apps-in-developer-portal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs attention This issue needs the attention of a contributor.
Projects
None yet
Development

No branches or pull requests

3 participants