Skip to content

[WIP] Fix Admin Center publish wizard false error message#251

Draft
Copilot wants to merge 1 commit intomainfrom
copilot/fix-admin-center-publish-error
Draft

[WIP] Fix Admin Center publish wizard false error message#251
Copilot wants to merge 1 commit intomainfrom
copilot/fix-admin-center-publish-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 23, 2026

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>Admin Center: Publish wizard shows "Publish failed" UI error despite agent being successfully published via a365 publish CLI</issue_title>
<issue_description>### Description

After successfully running a365 publish (CLI exits with success) and configuring the agent blueprint in the Teams Developer Portal, the M365 Admin Center publish wizard (admin.cloud.microsoft) consistently shows:

"We couldn't publish your agent agentframework Blueprint. Please try again."
However, the agent is actually published — it appears in the Agents → Requests tab with status Pending review and shows Copilot + Teams as supported channels. The wizard error is a false negative caused by CSP violations in the browser console:
Uncaught (in promise) Error: Publish command did not complete successfully
Connecting to '' violates Content Security Policy directive: connect-src

Link : https://github.com/microsoft/Agent365-Samples/tree/main/python/agent-framework/sample-agent

Expected behavior

The publish wizard should show success after a365 publish completes and the Teams Developer Portal is configured.

SDK Version

a365 v1.1.109.19759

Language/Runtime

Python 3.13.12

OS

Windows 11

How to Reproduce

  1. Run a365 publish → CLI succeeds
  2. Configure agent blueprint at https://dev.teams.microsoft.com/tools/agent-blueprint//configuration (Agent Type: Bot Based, Bot ID: )
  3. Go to M365 Admin Center → Agents → Publish new agent
  4. Select users → Apply policy → Review and finish → click Publish
  5. Wizard shows "Publish failed" with CSP errors in browser console

Output

Actual: Wizard shows publish failure. Browser console shows multiple CSP connect-src violations blocking network requests from admin.cloud.microsoft.

Screenshots

Image

Code of Conduct

Comments on the Issue (you are @copilot in this section)

@biswapm @smita-MSFT, Could you please cross check these configs and confirm.

Does the user have the right admin role?
Global Admin, or Teams Administrator + App Catalog Admin

Tenant-level app policies

Go to: Teams Admin Center → Teams apps → Permission policies
Check if custom/LOB apps are allowed for the tenant
If blocked at tenant level, the wizard may fail silently

Integrated Apps settings

Go to: Admin Center → Settings → Integrated apps
Check if the toggle for "Allow users to install preview features" or third-party/custom apps is enabled</comment_new>


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin Center: Publish wizard shows "Publish failed" UI error despite agent being successfully published via a365 publish CLI

2 participants