From 4fa338e2b3544a75711960973d32e731b95203a9 Mon Sep 17 00:00:00 2001 From: tvelosa Date: Thu, 21 Aug 2025 13:21:33 +0100 Subject: [PATCH 1/3] Update site-get.md Added a note about a known issue when trying to access a group team site due to previously reported incidents regarding this. --- api-reference/v1.0/api/site-get.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api-reference/v1.0/api/site-get.md b/api-reference/v1.0/api/site-get.md index 21b33dddc7d..199041c949b 100644 --- a/api-reference/v1.0/api/site-get.md +++ b/api-reference/v1.0/api/site-get.md @@ -52,6 +52,11 @@ To access the team site for a group: GET /groups/{group-id}/sites/root ``` +> [!IMPORTANT] +> This API has a known issue: when trying to access a group team site using `GET /groups/{group-id}/sites/root`, you may receive a **308 Permanent Redirect** response. If you follow the Location URL in the response header, it will lead to a **401 Unauthorized** error because the redirect targets the SharePoint REST API directly. **This happens when the group team's site has been renamed.** +> +> As a workaround, you can extract the site domain and relative path from the redirect URL in the response header and then retrieve the SharePoint site by path using `GET /sites/{hostname}:/{relative-path}`. For more information, see: [Get SharePoint site by path](https://learn.microsoft.com/en-us/graph/api/site-getbypath?view=graph-rest-1.0). + ## Request headers |Name|Description| From 096e3e0d737771aa45749d04627f4a0e85a50739 Mon Sep 17 00:00:00 2001 From: tvelosa Date: Thu, 21 Aug 2025 13:41:10 +0100 Subject: [PATCH 2/3] Update site-get.md Performed changes as per the warning - replaced the absolute link to get a sharepoint site by path with a relative one. --- api-reference/v1.0/api/site-get.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-reference/v1.0/api/site-get.md b/api-reference/v1.0/api/site-get.md index 199041c949b..d858b9adeec 100644 --- a/api-reference/v1.0/api/site-get.md +++ b/api-reference/v1.0/api/site-get.md @@ -55,7 +55,7 @@ GET /groups/{group-id}/sites/root > [!IMPORTANT] > This API has a known issue: when trying to access a group team site using `GET /groups/{group-id}/sites/root`, you may receive a **308 Permanent Redirect** response. If you follow the Location URL in the response header, it will lead to a **401 Unauthorized** error because the redirect targets the SharePoint REST API directly. **This happens when the group team's site has been renamed.** > -> As a workaround, you can extract the site domain and relative path from the redirect URL in the response header and then retrieve the SharePoint site by path using `GET /sites/{hostname}:/{relative-path}`. For more information, see: [Get SharePoint site by path](https://learn.microsoft.com/en-us/graph/api/site-getbypath?view=graph-rest-1.0). +> As a workaround, you can extract the site domain and relative path from the redirect URL in the response header and then retrieve the SharePoint site by path using `GET /sites/{hostname}:/{relative-path}`. For more information, see: [Get SharePoint site by path](site-getbypath.md). ## Request headers From 1c31ad0ea735870f4add524a01a136d9e8e60843 Mon Sep 17 00:00:00 2001 From: Daniela Bonilla Montero <92937694+Danielabom@users.noreply.github.com> Date: Tue, 2 Sep 2025 12:47:38 -0600 Subject: [PATCH 3/3] Update site-get.md --- api-reference/v1.0/api/site-get.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/api-reference/v1.0/api/site-get.md b/api-reference/v1.0/api/site-get.md index d858b9adeec..183522271e5 100644 --- a/api-reference/v1.0/api/site-get.md +++ b/api-reference/v1.0/api/site-get.md @@ -52,10 +52,14 @@ To access the team site for a group: GET /groups/{group-id}/sites/root ``` -> [!IMPORTANT] -> This API has a known issue: when trying to access a group team site using `GET /groups/{group-id}/sites/root`, you may receive a **308 Permanent Redirect** response. If you follow the Location URL in the response header, it will lead to a **401 Unauthorized** error because the redirect targets the SharePoint REST API directly. **This happens when the group team's site has been renamed.** +> [!NOTE] +> This API has a [known issue](https://developer.microsoft.com/en-us/graph/known-issues/?search={ID}): accessing a renamed group team site using `GET /groups/{group-id}/sites/root` may return a **308 Permanent Redirect**, which, if followed directly, results in a **401 Unauthorized** error. This happens because the redirect targets the SharePoint REST API directly. > -> As a workaround, you can extract the site domain and relative path from the redirect URL in the response header and then retrieve the SharePoint site by path using `GET /sites/{hostname}:/{relative-path}`. For more information, see: [Get SharePoint site by path](site-getbypath.md). +> **Workaround:** Extract the site domain and relative path from the redirect URL in the response header, then retrieve the SharePoint site by path using: +> ``` +> GET /sites/{hostname}:/{relative-path} +> ``` +> For more information, see [Get SharePoint site by path](site-getbypath.md). ## Request headers