# 既定のライブラリが空 - エラー 404

## 問題

KONNEKT 内のすべてのドキュメント ライブラリとマップされたドライブは空です。

## 背景

Microsoft 側の SharePoint Online をホストしている特定のデータセンターで不具合が発生しています。KONNEKT は Microsoft の GraphAPI を使用して、ドキュメント ライブラリとそのコンテンツに関連するすべての情報にアクセスしています。

特に、Site Collection から既定のドキュメント ライブラリを取得する要求（[ドライブを取得](https://learn.microsoft.com/en-us/graph/api/drive-get)）。KONNEKT のログには、既定のライブラリ操作が失敗した場合に次のようなエントリが含まれているはずです:&#x20;

```
[2025-05-07 11:31:28.957] [30304] [error] [RESTkitClient] Http request (OneDriveClient::GetDefaultDrive) GET: https://graph.microsoft.com/v1.0/sites/<TenantName>.sharepoint.com,8fd7d761-4f99-4fdc-a0aa-de6b685e5306,56d1fa73-2339-4329-9df3-61100d751650/drive - 404
    error: Item not found: The resource could not be found.(404)
   "{"error":{"code":"itemNotFound","message":"The resource could not be found.","innerError":{"date":"2025-05-07T09:31:28","request-id":"17a44641-4204-4811-b176-58a379125b5d","client-request-id":"17a44641-4204-4811-b176-58a379125b5d"}}}"
    レスポンス ヘッダー:
Cache-Control: no-store, no-cache
client-request-id: 17a44641-4204-4811-b176-58a379125b5d
Content-Type: application/json
Date: Wed, 07 May 2025 09:31:27 GMT
request-id: 17a44641-4204-4811-b176-58a379125b5d
Strict-Transport-Security: max-age=31536000
Transfer-Encoding: chunked
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"France Central","Slice":"E","Ring":"5","ScaleUnit":"004","RoleInstance":"PA2PEPF00011C65"}}
    レスポンス:
{"error":{"code":"itemNotFound","message":"The resource could not be found.","innerError":{"date":"2025-05-07T09:31:28","request-id":"17a44641-4204-4811-b176-58a379125b5d","client-request-id":"17a44641-4204-4811-b176-58a379125b5d"}}}
```

または

```
[2025-05-09 08:43:36.353] [23796] [error] [RESTkitClient] Http request (OneDriveClient::GetDefaultDrive) GET: https://graph.microsoft.com/v1.0/sites/<TenantName>.sharepoint.com,8fd7d761-4f99-4fdc-a0aa-de6b685e5306,56d1fa73-2339-4329-9df3-61100d751650/drive - 404
    error: Item not found: The resource could not be found.(404)
   "{"error":{"code":"itemNotFound","message":"The resource could not be found.","innerError":{"date":"2025-05-09T06:43:36","request-id":"17a44641-4204-4811-b176-58a379125b5d","client-request-id":"17a44641-4204-4811-b176-58a379125b5d"}}}"
```

調査するには、GraphExplorer を使用して、このドキュメント ライブラリへの get リクエストを確認してください:

<https://developer.microsoft.com/en-us/graph/graph-explorer>

## 回避策

1\) 設定「[すべての SharePoint ドキュメント ライブラリを追加](https://docs.konnekt.io/configuration/mappings/auto-mapping#map-all-document-libraries)".

」を有効にすると、KONNEKT は [ドライブを一覧表示](https://learn.microsoft.com/en-us/graph/api/drive-list?view=graph-rest-1.0\&tabs=http) 要求を使用して、Site Collection からすべてのドキュメント ライブラリを取得します。

{% hint style="info" %}
この設定を有効にすると、既存のファイル リンクが壊れることにご注意ください。
{% endhint %}

2\) 「[Managed Mappings](https://docs.konnekt.io/ja/configuration/mappings/managed-mappings)」を使用して重要なドキュメント ライブラリをマッピングし、設定「[Sharepoint Sites 自動検出](https://docs.konnekt.io/configuration/mappings/auto-mapping#map-all-document-libraries)".

## GitHub issue

<https://github.com/SharePoint/sp-dev-docs/issues/10241>
