Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Unable to Deploy SPFx Agent to a Single SharePoint Site (Works Only with Tenant-Wide Deployment)

オープン
#531 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
静か
技術スタック
powershell, typescript

調査の方向性

テナント全体および単一サイトの .sppkg デプロイ設定(skipFeatureDeployment と ClientSideInstance.xml を含む)を比較し、PnP PowerShell のカスタム アクション設定を確認します。両方のデプロイ パスを再現し、トークン取得がどこで異なるかを追跡します。完了の条件は、エージェントが対象サイトで認証され、他のサイトには表示されないことです。

索引モデルが issue の本文から書いたものです。

説明

I have developed an SPFx Application Customizer that hosts a Copilot/Agent sidebar in SharePoint.

Scenario 1: Tenant-Wide Deployment (Works)

When I upload the .sppkg package and select "Enable this app and add it to all sites":

The extension is automatically added to Tenant-Wide Extensions.
I configure the following properties:
Client App ID
Tenant ID
Redirect URL
The bot icon appears in SharePoint.
The agent connects successfully and works as expected.

However, because the deployment is tenant-wide, the bot icon also appears on all other SharePoint sites, which is not my requirement.

Scenario 2: Single Site Deployment (Fails)

When I upload the same .sppkg package and select "Only enable this app":

No entry is created in Tenant-Wide Extensions.
The app is available on the target SharePoint site.
The agent attempts to connect but fails with the error:
Plain Text
Unable to Acquire Token

Show more lines
Troubleshooting Attempted

  1. Set skipFeatureDeployment to false
    JSON
    {

"skipFeatureDeployment": false

}

Result: No change.

  1. Register the Application Customizer manually using PnP PowerShell
    PowerShell
    Add-PnPCustomAction `

-ClientSideComponentId 4c6e29f2-7eee-4f9f-bbd2-20c8859d0ba2 `

-ClientSideComponentProperties '{"appClientId":"...","tenantId":"...","directConnectUrl":"..."}' `

-Location ClientSideExtension.ApplicationCustomizer `

-Name "SidebarAgent" `

-Title "SidebarAgent" `

-Scope Web

Show more lines

Result: The agent still fails with "Unable to Acquire Token".

even MS support team suggest to delete or remove the ClientSideInstance.xml file and build the solution package. i Did same but result is same

Questions
Why does token acquisition work when the extension is deployed tenant-wide but fail when deployed to a single site?
Is there any additional configuration required for site-scoped deployment?
What is the recommended approach to deploy an SPFx Application Customizer/Agent to only one SharePoint site?
Has anyone successfully implemented a single-site deployment for a similar SPFx-based agent?
Expected Behavior

The agent should be available and functional only on the target SharePoint site, without appearing on other sites across the tenant.

Image
主要言語
TypeScript
スター
797
フォーク
491
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/CopilotStudioSamples のほかの issue

microsoft/CopilotStudioSamples の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。