Skip to content

Commit 84eb0bc

Browse files
authored
Merge pull request #25924 from microsoftgraph/main
Merge to publish.
2 parents 403ae38 + 65ee90b commit 84eb0bc

File tree

4 files changed

+42
-153
lines changed

4 files changed

+42
-153
lines changed

api-reference/beta/api/site-get.md

Lines changed: 15 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -59,50 +59,16 @@ GET /groups/{group-id}/sites/root
5959
### Example 1: Get a site using the site ID
6060
#### Request
6161

62+
The following example shows a request that gets a site by its site ID. A site ID is the value of the **id** property of its **site** resource. For more information on the format of the site ID, see [site](../resources/site.md#id-property).
6263

63-
# [HTTP](#tab/http)
64-
<!-- { "blockType": "request", "name": "get-site" } -->
64+
<!-- { "blockType": "request", "name": "get-site", "sampleKeys": ["contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE"] } -->
6565

6666
```msgraph-interactive
67-
GET /sites/{site-id}
67+
GET https://graph.microsoft.com/beta/sites/contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE
6868
```
6969

70-
# [C#](#tab/csharp)
71-
[!INCLUDE [sample-code](../includes/snippets/csharp/get-site-csharp-snippets.md)]
72-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
73-
74-
# [CLI](#tab/cli)
75-
[!INCLUDE [sample-code](../includes/snippets/cli/get-site-cli-snippets.md)]
76-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
77-
78-
# [Go](#tab/go)
79-
[!INCLUDE [sample-code](../includes/snippets/go/get-site-go-snippets.md)]
80-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
81-
82-
# [Java](#tab/java)
83-
[!INCLUDE [sample-code](../includes/snippets/java/get-site-java-snippets.md)]
84-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
85-
86-
# [JavaScript](#tab/javascript)
87-
[!INCLUDE [sample-code](../includes/snippets/javascript/get-site-javascript-snippets.md)]
88-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
89-
90-
# [PHP](#tab/php)
91-
[!INCLUDE [sample-code](../includes/snippets/php/get-site-php-snippets.md)]
92-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
93-
94-
# [PowerShell](#tab/powershell)
95-
[!INCLUDE [sample-code](../includes/snippets/powershell/get-site-powershell-snippets.md)]
96-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
97-
98-
# [Python](#tab/python)
99-
[!INCLUDE [sample-code](../includes/snippets/python/get-site-python-snippets.md)]
100-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
101-
102-
---
103-
10470
#### Response
105-
71+
The following example shows the response.
10672
<!-- { "blockType": "response", "@type": "microsoft.graph.site", "truncated": true } -->
10773

10874
```http
@@ -127,12 +93,16 @@ Content-type: application/json
12793

12894
### Example 2: Get a site by server relative URL
12995
#### Request
130-
<!-- { "blockType": "request", "name": "get-site-by-url", "scopes": "sites.read.all" } -->
96+
97+
The following example shows a request that gets a site by its hostname and server relative path.
98+
99+
<!-- { "blockType": "request", "name": "get-site-by-url", "scopes": "sites.read.all", "sampleKeys": ["contoso.sharepoint.com:/teams/1drvteam"] } -->
131100
```http
132-
GET https://graph.microsoft.com/v1.0/sites/{hostname}:/{server-relative-path}
101+
GET https://graph.microsoft.com/beta/sites/contoso.sharepoint.com:/teams/1drvteam
133102
```
134103

135104
#### Response
105+
The following example shows the response.
136106
<!-- { "blockType": "response", "@type": "microsoft.graph.site", "truncated": true } -->
137107
```http
138108
HTTP/1.1 200 OK
@@ -150,47 +120,16 @@ Content-type: application/json
150120

151121
### Example 3: Get the site of a group
152122
#### Request
153-
# [HTTP](#tab/http)
123+
The following example shows a request that gets a group's site by the **id** property of a [group](../resources/group.md).
124+
154125
<!-- { "blockType": "request", "name": "get-site-by-group"} -->
155126
```msgraph-interactive
156-
GET https://graph.microsoft.com/v1.0/groups/{group-id}/sites/root
127+
GET https://graph.microsoft.com/beta/groups/2C712604-1370-44E7-A1F5-426573FDA80A/sites/root
157128
```
158129

159-
# [C#](#tab/csharp)
160-
[!INCLUDE [sample-code](../includes/snippets/csharp/get-site-by-group-csharp-snippets.md)]
161-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
162-
163-
# [CLI](#tab/cli)
164-
[!INCLUDE [sample-code](../includes/snippets/cli/get-site-by-group-cli-snippets.md)]
165-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
166-
167-
# [Go](#tab/go)
168-
[!INCLUDE [sample-code](../includes/snippets/go/get-site-by-group-go-snippets.md)]
169-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
170-
171-
# [Java](#tab/java)
172-
[!INCLUDE [sample-code](../includes/snippets/java/get-site-by-group-java-snippets.md)]
173-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
174-
175-
# [JavaScript](#tab/javascript)
176-
[!INCLUDE [sample-code](../includes/snippets/javascript/get-site-by-group-javascript-snippets.md)]
177-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
178-
179-
# [PHP](#tab/php)
180-
[!INCLUDE [sample-code](../includes/snippets/php/get-site-by-group-php-snippets.md)]
181-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
182-
183-
# [PowerShell](#tab/powershell)
184-
[!INCLUDE [sample-code](../includes/snippets/powershell/get-site-by-group-powershell-snippets.md)]
185-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
186-
187-
# [Python](#tab/python)
188-
[!INCLUDE [sample-code](../includes/snippets/python/get-site-by-group-python-snippets.md)]
189-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
190-
191-
---
192-
193130
#### Response
131+
The following example shows the response.
132+
194133
<!-- { "blockType": "response", "@type": "microsoft.graph.site", "truncated": true } -->
195134
```http
196135
HTTP/1.1 200 OK

api-reference/v1.0/api/site-get.md

Lines changed: 13 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -63,49 +63,16 @@ GET /groups/{group-id}/sites/root
6363
### Example 1: Get a site using the site ID
6464
#### Request
6565

66+
The following example shows a request that gets a site by its site ID. A site ID is the value of the **id** property of its **site** resource. For more information on the format of the site ID, see [site](../resources/site.md#id-property).
6667

67-
# [HTTP](#tab/http)
68-
<!-- { "blockType": "request", "name": "get-site", "scopes": "sites.read.all" } -->
68+
<!-- { "blockType": "request", "name": "get-site", "scopes": "sites.read.all", "sampleKeys": ["contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE"] } -->
6969

7070
```msgraph-interactive
71-
GET https://graph.microsoft.com/v1.0/sites/{site-id}
71+
GET https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE
7272
```
7373

74-
# [C#](#tab/csharp)
75-
[!INCLUDE [sample-code](../includes/snippets/csharp/get-site-csharp-snippets.md)]
76-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
77-
78-
# [CLI](#tab/cli)
79-
[!INCLUDE [sample-code](../includes/snippets/cli/get-site-cli-snippets.md)]
80-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
81-
82-
# [Go](#tab/go)
83-
[!INCLUDE [sample-code](../includes/snippets/go/get-site-go-snippets.md)]
84-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
85-
86-
# [Java](#tab/java)
87-
[!INCLUDE [sample-code](../includes/snippets/java/get-site-java-snippets.md)]
88-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
89-
90-
# [JavaScript](#tab/javascript)
91-
[!INCLUDE [sample-code](../includes/snippets/javascript/get-site-javascript-snippets.md)]
92-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
93-
94-
# [PHP](#tab/php)
95-
[!INCLUDE [sample-code](../includes/snippets/php/get-site-php-snippets.md)]
96-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
97-
98-
# [PowerShell](#tab/powershell)
99-
[!INCLUDE [sample-code](../includes/snippets/powershell/get-site-powershell-snippets.md)]
100-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
101-
102-
# [Python](#tab/python)
103-
[!INCLUDE [sample-code](../includes/snippets/python/get-site-python-snippets.md)]
104-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
105-
106-
---
107-
10874
#### Response
75+
The following example shows the response.
10976

11077
<!-- { "blockType": "response", "@type": "microsoft.graph.site", "truncated": true } -->
11178

@@ -126,12 +93,15 @@ Content-type: application/json
12693

12794
### Example 2: Get a site by server relative URL
12895
#### Request
129-
<!-- { "blockType": "request", "name": "get-site-by-url", "scopes": "sites.read.all" } -->
96+
The following example shows a request that gets a site by its hostname and server relative path.
97+
98+
<!-- { "blockType": "request", "name": "get-site-by-url", "scopes": "sites.read.all", "sampleKeys": ["contoso.sharepoint.com:/teams/1drvteam"] } -->
13099
```http
131-
GET https://graph.microsoft.com/v1.0/sites/{hostname}:/{server-relative-path}
100+
GET https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com:/teams/1drvteam
132101
```
133102

134103
#### Response
104+
The following example shows the response.
135105
<!-- { "blockType": "response", "@type": "microsoft.graph.site", "truncated": true } -->
136106
```http
137107
HTTP/1.1 200 OK
@@ -149,47 +119,15 @@ Content-type: application/json
149119

150120
### Example 3: Get the site of a group
151121
#### Request
152-
# [HTTP](#tab/http)
122+
The following example shows a request that gets a group's site by the **id** property of a [group](../resources/group.md).
123+
153124
<!-- { "blockType": "request", "name": "get-site-by-group"} -->
154125
```msgraph-interactive
155-
GET https://graph.microsoft.com/v1.0/groups/{group-id}/sites/root
126+
GET https://graph.microsoft.com/v1.0/groups/2C712604-1370-44E7-A1F5-426573FDA80A/sites/root
156127
```
157128

158-
# [C#](#tab/csharp)
159-
[!INCLUDE [sample-code](../includes/snippets/csharp/get-site-by-group-csharp-snippets.md)]
160-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
161-
162-
# [CLI](#tab/cli)
163-
[!INCLUDE [sample-code](../includes/snippets/cli/get-site-by-group-cli-snippets.md)]
164-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
165-
166-
# [Go](#tab/go)
167-
[!INCLUDE [sample-code](../includes/snippets/go/get-site-by-group-go-snippets.md)]
168-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
169-
170-
# [Java](#tab/java)
171-
[!INCLUDE [sample-code](../includes/snippets/java/get-site-by-group-java-snippets.md)]
172-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
173-
174-
# [JavaScript](#tab/javascript)
175-
[!INCLUDE [sample-code](../includes/snippets/javascript/get-site-by-group-javascript-snippets.md)]
176-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
177-
178-
# [PHP](#tab/php)
179-
[!INCLUDE [sample-code](../includes/snippets/php/get-site-by-group-php-snippets.md)]
180-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
181-
182-
# [PowerShell](#tab/powershell)
183-
[!INCLUDE [sample-code](../includes/snippets/powershell/get-site-by-group-powershell-snippets.md)]
184-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
185-
186-
# [Python](#tab/python)
187-
[!INCLUDE [sample-code](../includes/snippets/python/get-site-by-group-python-snippets.md)]
188-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
189-
190-
---
191-
192129
#### Response
130+
The following example shows the response.
193131
<!-- { "blockType": "response", "@type": "microsoft.graph.site", "truncated": true } -->
194132
```http
195133
HTTP/1.1 200 OK

concepts/migrate-azure-ad-graph-faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ If you own an application's source code, search for the `https://graph.windows.n
4444

4545
## As an IT admin, how do I identify apps in my tenant that use Azure AD Graph?
4646

47-
Use one of the following three methods to identify apps in your tenant with a dependency on Azure AD Graph.
47+
Use the following four methods to identify apps in your tenant with a dependency on Azure AD Graph. Method 1 and 2 identify your apps that use Azure AD Graph based on the actual app activities while method 3 and 4 use static app configuration and consent status. You can combine these methods to find apps that have a dependency on Azure AD Graph.
4848

4949
### Method 1: Through network proxy logs
5050

@@ -67,7 +67,7 @@ Check your network server traffic logs through a filter proxy for any apps calli
6767

6868
:::image type="content" source="/graph/images/aadgraph-to-msgraph-migration/RequestedAPI-AAD.png" alt-text="Filter apps that use Azure AD Graph." border="true":::
6969

70-
### Method 3: Use a PowerShell script
70+
### Method 4: Use a PowerShell script
7171

7272
Download and run [this PowerShell script](https://github.com/microsoft/AzureADGraphApps). Use this method to retrieve apps with their home directory in your tenant and apps with their home directories in other tenants.
7373

concepts/sdks/create-client.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,36 @@ The client ID is the app registration ID that is generated when you [register yo
2222

2323
:::code language="csharp" source="./snippets/dotnet/src/SdkSnippets/Snippets/CreateClients.cs" id="DeviceCodeSnippet":::
2424

25+
> Include `using` statements for `Azure.Identity` and `Microsoft.Graph` to run this code.
26+
2527
# [Go](#tab/go)
2628

2729
:::code language="go" source="./snippets/go/src/snippets/create_clients.go" id="DeviceCodeSnippet":::
2830

31+
> Include `"github.com/Azure/azure-sdk-for-go/sdk/azidentity"` and `graph "github.com/microsoftgraph/msgraph-sdk-go"` in your import block to run this code.
32+
2933
# [Java](#tab/java)
3034

3135
:::code language="java" source="./snippets/java/app/src/main/java/snippets/CreateClients.java" id="DeviceCodeSnippet":::
3236

37+
> Include `import` statements for `com.azure.identity.DeviceCodeCredential`, `com.azure.identity.DeviceCodeCredentialBuilder`, and `com.microsoft.graph.serviceclient.GraphServiceClient` to run this code.
38+
3339
# [PHP](#tab/php)
3440

3541
:::code language="php" source="./snippets/php/snippets/CreateClients.php" id="AuthorizationCodeSnippet":::
3642

43+
> Include `use` statements for `Microsoft\Graph\GraphRequestAdapter`, `Microsoft\Graph\GraphServiceClient`, and `Microsoft\Kiota\Abstractions\Authentication\BaseBearerTokenAuthenticationProvider` to run this code.
44+
3745
# [Python](#tab/python)
3846

3947
:::code language="python" source="./snippets/python/src/snippets/create_clients.py" id="DeviceCodeSnippet":::
4048

49+
> Include `import` statements for `DeviceCodeCredential` from `azure.identity` and `GraphServiceClient` from `msgraph.graph_service_client` to run this code.
50+
4151
# [TypeScript](#tab/typescript)
4252

4353
:::code language="typescript" source="./snippets/typescript/src/snippets/createClients.ts" id="DeviceCodeSnippet":::
4454

55+
> Include `import` statements for `DeviceCodeCredential` from `@azure/identity`, `Client` from `@microsoft/microsoft-graph-client`, and `TokenCredentialAuthenticationProvider` from `@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials` to run this code.
56+
4557
---

0 commit comments

Comments
 (0)