Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into andrueastman/fixDocsV…
Browse files Browse the repository at this point in the history
…alidation
  • Loading branch information
Andrew Omondi committed Feb 1, 2024
2 parents fb32cb9 + 140f756 commit 0b39970
Show file tree
Hide file tree
Showing 108 changed files with 4,666 additions and 351 deletions.
57 changes: 57 additions & 0 deletions .azure-pipelines/.config/CredScanSuppressions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"tool": "Credential Scanner",
"suppressions": [
{
"hash": "4HFMaPyHf2Oq0UHssXYQ+IzVZIRgG18pB/v4dtou7sw=",
"_justification": "authenticationmethod-resetpassword.md line 184 Sample password in JSON example"
},
{
"hash": "Dl8lVS64t7J9YPKUCrs6IvmGgwA9lkG/9TTJvKLyIfw=",
"_justification": "externallyaccessibleawsstoragebucketfinding-list.md line 118 Sample Azure storage account access key in JSON example"
},
{
"hash": "6uNofS5cYXMBA0lB/CvV80FLhrnf5Pgi8z1A4ouVNzE=",
"_justification": "security-passivednsrecord-get.md line 66 Sample general symmetric key in HTTP request example"
},
{
"hash": "DqnzqSuPoql8CRa0NwVQjvMWVEdB/1JVZhMLf5a7caw=",
"_justification": "serviceprincipal-createpasswordsinglesignoncredentials.md line 90 Sample common default password in JSON example"
},
{
"hash": "YGEAcd2dkpni4zKf2vds0XCBd4ETjyy6VSqP6wF8K4Y=",
"_justification": "security-whoishistoryrecord-get.md line 64 Sample symmetric key in HTTP request example"
},
{
"hash": "yuNZ6vrD0RfK/gi2biOeRwncQ7QBOUsptruQ9gF4fGE=",
"_justification": "user-changepassword.md line 67 Sample password in JSON example"
},
{
"hash": "XQQz4syNsXVwCQBB+ROKXms/PeYf1xxMiu93rtFGQzE=",
"_justification": "user-validatepassword.md line 69 Sample password in JSON example"
},
{
"hash": "449XS9qz2RDCs4hRlMopVw7CCRxp01qRBUh152CBj1w=",
"_justification": "send-sharing-invite-go-snippets.md line 40 Sample password in JSON example"
},
{
"hash": "ezuuJrz3tJVuhDI3QayaAQnoJmJ7OdePNofJCf9yRos=",
"_justification": "update-planneruser-go-snippets.md line 22 Sample general symmetric key in code snippets"
},
{
"hash": "4HFMaPyHf2Oq0UHssXYQ+IzVZIRgG18pB/v4dtou7sw=",
"_justification": "passwordauthenticationmethod-resetpassword-adminprovided-java-snippets.md line 9 Sample password in code snippets"
},
{
"hash": "pFG5S9mElRlcOZ+ByQRi1yN4nzkV+sW0DBJStZwB13I=",
"_justification": "application-saml-sso-configure-api.md line 1004 Sample general symmetric key in JSON example"
},
{
"hash": "lrucAcVPXoYUsoNE7NH+dQDxA5dKVl04BhLUkL2i+k8=",
"_justification": "auth-v2-service.md line 166 Sample Azure AD client secret in cURL example"
},
{
"hash": "Yq6kyr67P2hd5i71eNVIOL8EHosrVwv9Mg0R6PdiF6c=",
"_justification": "authenticationmethods-get-started.md line 451 Sample general password in JSON example"
}
]
}
24 changes: 17 additions & 7 deletions Test-Docs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,35 @@ $apiDoctorNuGetVersion = $env:API_DOCTOR_NUGET_VERSION
$apiDoctorGitRepoUrl = $env:API_DOCTOR_GIT_REPO_URL
$apiDoctorGitBranch = $env:API_DOCTOR_GIT_BRANCH
$docsRepoPath = (Get-Location).Path
$docsSubPath = $env:APIDOCTOR_DOCSUBPATH
$docsSubPath = $env:DOCS_SUB_PATH
$downloadedApiDoctor = $false
$downloadedNuGet = $false

Write-Host "Repository location: ", $docsRepoPath
if ($useNuGetPackage -eq $true) {
Write-Host "API Doctor NuGet Version: ", $apiDoctorNuGetVersion
}
else {
Write-Host "API Doctor Git Repo:"
Write-Host "- URL: $apiDoctorGitRepoUrl"
Write-Host "- Branch: $apiDoctorGitBranch"
}

Write-Host "Repository Location: ", $docsRepoPath
Write-Host "Docs Subpath: ", $docsSubPath

# Check if API Doctor source has been set
if ($useNuGetPackage -and [string]::IsNullOrWhiteSpace($apiDoctorNuGetVersion)) {
if ($useNuGetPackage -eq $true -and [string]::IsNullOrWhiteSpace($apiDoctorNuGetVersion)) {
Write-Host "API Doctor NuGet package version has not been set. Aborting..."
exit 1
}
elseif (!$useNuGetPackage -and [string]::IsNullOrWhiteSpace($apiDoctorGitRepoUrl)) {
elseif ($useNuGetPackage -eq $false -and [string]::IsNullOrWhiteSpace($apiDoctorGitRepoUrl)) {
Write-Host "API Doctor Git Repo URL has not been set. Aborting..."
exit 1
}

# Check if docs subpath has been set
if ([string]::IsNullOrWhiteSpace($docsSubPath)) {
Write-Host "API Doctor subpath has not been set. Aborting..."
Write-Host "Docs subpath has not been set. Aborting..."
exit 1
}

Expand Down Expand Up @@ -56,15 +66,15 @@ else {
$apidocPath = Join-Path $docsRepoPath -ChildPath "apidoctor"
New-Item -ItemType Directory -Force -Path $apidocPath

if ($useNuGetPackage) {
if ($useNuGetPackage -eq $true) {
# Install API Doctor from NuGet
Write-Host "Running nuget.exe from ", $nugetPath
$nugetParams = "install", "ApiDoctor", "-Version", $apiDoctorNuGetVersion, "-OutputDirectory", $apidocPath, "-NonInteractive", "-DisableParallelProcessing"
& $nugetPath $nugetParams

if ($LastExitCode -ne 0) {
# NuGet error, so we can't proceed
Write-Host "Error installing API Doctor from NuGet. Aborting."
Write-Host "Error installing API Doctor from NuGet. Aborting..."
Remove-Item $nugetPath
exit $LastExitCode
}
Expand Down
19 changes: 10 additions & 9 deletions api-reference/beta/api/chatmessage-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Namespace: microsoft.graph

Send a new [chatMessage](../resources/chatmessage.md) in the specified [channel](../resources/channel.md) or a [chat](../resources/chat.md).

> **Note**: We don't recommend that you use this API for data migration. It does not have the throughput necessary for a typical migration.
> **Note**: It is a violation of the [terms of use](/legal/microsoft-apis/terms-of-use) to use Microsoft Teams as a log file. Only send messages that people will read.
> **Notes:**
> - We don't recommend that you use this API for data migration. It does not have the throughput necessary for a typical migration.
> - It is a violation of the [terms of use](/legal/microsoft-apis/terms-of-use) to use Microsoft Teams as a log file. Only send messages that people will read.
[!INCLUDE [national-cloud-support](../../includes/all-clouds.md)]

Expand Down Expand Up @@ -481,8 +481,9 @@ Content-type: application/json
#### Request
The following example shows a request.

>**Note:** The file must already be in SharePoint. To find the file properties, GET the **driveItem** for the file. For example, /drives/{id}/items/{id}. Your attachment ID is the GUID in the **eTag** of the **driveItem**, your attachment **contentURL** is the **webUrl** of the **driveItem**'s folder plus the **driveItem**'s name, and your attachment name is the **driveItem**'s name.
>**Notes:**
> - The file must already be in SharePoint. To find the file properties, GET the **driveItem** for the file. For example: `/drives/{id}/items/{id}`. The attachment ID is the GUID in the **eTag** of the **driveItem**. The attachment **contentURL** is the **webUrl** of the **driveItem** folder plus the name of the **driveItem**. The attachment name is the name of the **driveItem**.
> - Microsoft Graph supports the `OpenUrl` card action. Bots are required for other card actions.
# [HTTP](#tab/http)
<!-- {
Expand Down Expand Up @@ -617,7 +618,7 @@ The following example shows a request.

> **Note:** The **temporaryId** in the **hostedContents** collection is a random ID, but must be same across the **body** and **hostedContents** elements. (Notice the **temporaryId** set to `1` and the reference in body as `../hostedContents/1/$value`.).
**contentBytes** must be set to binary string Base64-encoded bytes. You can do this in C# by using `Convert.ToBase64String(File.ReadAllBytes("image.png"));`.
**contentBytes** must be set to binary string Base64-encoded bytes. You can convert an item to binary Base64-encoded bytes in C# by using `Convert.ToBase64String(File.ReadAllBytes("image.png"));`, for example.


# [HTTP](#tab/http)
Expand Down Expand Up @@ -742,7 +743,7 @@ The following example shows a request.
> * The **temporaryId** in the **hostedContents** collection is a random ID, but must be same across the **content** (in **attachments**) and **hostedContents** elements. (Notice the **temporaryId** set to `1` and the reference in content as `../hostedContents/1/$value`.).
> * The maximum possible size of hosted content is 4 MB.
**contentBytes** must be set to binary string Base64-encoded bytes. You can do this in C# by using `Convert.ToBase64String(File.ReadAllBytes("image.png"));`.
**contentBytes** must be set to binary string Base64-encoded bytes. You can convert an item to binary Base64-encoded bytes in C# by using `Convert.ToBase64String(File.ReadAllBytes("image.png"));`, for example.


# [HTTP](#tab/http)
Expand Down Expand Up @@ -882,7 +883,7 @@ Content-type: application/json
}
```

### Example 7 : @mention a channel in a channel message
### Example 7: @mention a channel in a channel message

#### Request
The following example shows a request. For information about how to get a list of channels in a team, see [List channels](../api/channel-list.md).
Expand Down Expand Up @@ -1176,7 +1177,7 @@ Content-type: application/json
}
```

### Example 9 : @mention a tag in a channel message
### Example 9: @mention a tag in a channel message

#### Request
The following example shows a request. For information about how to get a list of tags in a team, see [List teamworkTags](../api/teamworktag-list.md).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Namespace: microsoft.graph
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]

> [!CAUTION]
> This API is deprecated and will stop returning data on December 31, 2023. Going forward, use the [getFrontlineCloudPcAccessState](../api/cloudpc-getfrontlinecloudpcaccessstate.md) API.
> This API is deprecated and will stop returning data on April 24, 2024. Going forward, use the [getFrontlineCloudPcAccessState](../api/cloudpc-getfrontlinecloudpcaccessstate.md) API.
Get the [shiftWorkCloudPcAccessState](../resources/cloudpc.md#shiftworkcloudpcaccessstate-values-deprecated) of a shift work Cloud PC.

Expand Down
52 changes: 13 additions & 39 deletions api-reference/beta/api/cloudpcprovisioningpolicy-get.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ If successful, this method returns a `200 OK` response code and a [cloudPcProvis

#### Request

The following is an example of a request.
The following example shows a request.

# [HTTP](#tab/http)
<!-- {
Expand Down Expand Up @@ -150,6 +150,9 @@ Content-Type: application/json
"windowsSettings": {
"language": "en-US"
},
"windowsSetting": {
"locale": "en-US"
},
"managedBy": "windows365",
"provisioningType": "dedicated"
}
Expand All @@ -159,7 +162,7 @@ Content-Type: application/json

#### Request

The following is an example of a request.
The following example shows a request.

# [HTTP](#tab/http)
<!-- {
Expand Down Expand Up @@ -250,6 +253,9 @@ Content-Type: application/json
"windowsSettings": {
"language": "en-US"
},
"windowsSetting": {
"locale": "en-US"
},
"assignments": [
{
"@odata.type": "microsoft.graph.cloudPcProvisioningPolicyAssignment",
Expand All @@ -271,54 +277,19 @@ The following example shows a request that retrieves the selected properties of

#### Request

The following is an example of a request.
The following example shows a request.


# [HTTP](#tab/http)
<!-- {
"blockType": "request",
"name": "get_cloudpcprovisioningpolicy_3"
}
-->

``` http
GET https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/provisioningPolicies/60b94f83-3e22-430e-a69d-440f65b922d6?$select=id,description,displayName,displayName,domainJoinConfiguration,imageDisplayName,imageId,imageType,onPremisesConnectionId,windowsSettings,managedBy,cloudPcGroupDisplayName,gracePeriodInHours,localAdminEnabled,alternateResourceUrl
GET https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/provisioningPolicies/60b94f83-3e22-430e-a69d-440f65b922d6?$select=id,description,displayName,domainJoinConfiguration,imageDisplayName,imageId,imageType,onPremisesConnectionId,windowsSetting,managedBy,cloudPcGroupDisplayName,gracePeriodInHours,localAdminEnabled,alternateResourceUrl
```

# [C#](#tab/csharp)
[!INCLUDE [sample-code](../includes/snippets/csharp/get-cloudpcprovisioningpolicy-3-csharp-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [CLI](#tab/cli)
[!INCLUDE [sample-code](../includes/snippets/cli/get-cloudpcprovisioningpolicy-3-cli-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [Go](#tab/go)
[!INCLUDE [sample-code](../includes/snippets/go/get-cloudpcprovisioningpolicy-3-go-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [Java](#tab/java)
[!INCLUDE [sample-code](../includes/snippets/java/get-cloudpcprovisioningpolicy-3-java-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [JavaScript](#tab/javascript)
[!INCLUDE [sample-code](../includes/snippets/javascript/get-cloudpcprovisioningpolicy-3-javascript-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [PHP](#tab/php)
[!INCLUDE [sample-code](../includes/snippets/php/get-cloudpcprovisioningpolicy-3-php-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [PowerShell](#tab/powershell)
[!INCLUDE [sample-code](../includes/snippets/powershell/get-cloudpcprovisioningpolicy-3-powershell-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [Python](#tab/python)
[!INCLUDE [sample-code](../includes/snippets/python/get-cloudpcprovisioningpolicy-3-python-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

---

#### Response

The following example shows the response.
Expand Down Expand Up @@ -368,6 +339,9 @@ Content-Type: application/json
"windowsSettings": {
"language": "en-US"
},
"windowsSetting": {
"locale": "en-US"
},
"provisioningType": "dedicated"
}
```
48 changes: 9 additions & 39 deletions api-reference/beta/api/cloudpcprovisioningpolicy-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ The following table shows the properties that can be updated for the [cloudPcPro
|:---|:---|:---|
|description|String|The provisioning policy description.|
|displayName|String|The display name for the provisioning policy. |
|domainJoinConfiguration|[cloudPcDomainJoinConfiguration](../resources/cloudpcdomainjoinconfiguration.md)|Specifies how Cloud PCs will join Microsoft Entra ID.|
|domainJoinConfigurations|[cloudPcDomainJoinConfiguration](../resources/cloudpcdomainjoinconfiguration.md) collection|Specifies a list ordered by priority on how Cloud PCs join Microsoft Entra ID.|
|enableSingleSignOn|Boolean|`True` if the provisioned Cloud PC can be accessed by single sign-on. `False` indicates that the provisioned Cloud PC doesn't support this feature. Default value is `false`. Windows 365 users can use single sign-on to authenticate to Microsoft Entra ID with passwordless options (for example, FIDO keys) to access their Cloud PC. Optional.|
|imageDisplayName|String|The display name for the OS image you're provisioning.|
|imageId|String|The ID of the OS image you want to provision on Cloud PCs. The format for a gallery type image is: {publisher_offer_sku}. Supported values for each of the parameters are as follows: <ul><li>publisher: Microsoftwindowsdesktop.</li> <li>offer: windows-ent-cpc.</li> <li>sku: 21h1-ent-cpc-m365, 21h1-ent-cpc-os, 20h2-ent-cpc-m365, 20h2-ent-cpc-os, 20h1-ent-cpc-m365, 20h1-ent-cpc-os, 19h2-ent-cpc-m365 and 19h2-ent-cpc-os.</li></ul>|
|imageType|cloudPcProvisioningPolicyImageType|The type of OS image (custom or gallery) you want to provision on Cloud PCs. Possible values are: `gallery`, `custom`.|
|onPremisesConnectionId|String|The ID of the cloudPcOnPremisesConnection. To ensure that Cloud PCs have network connectivity and that they domain join, choose a connection with a virtual network that’s validated by the Cloud PC service.|
|windowsSettings|[cloudPcWindowsSettings](../resources/cloudpcwindowssettings.md)|The Windows operation system settings for the provisioned Cloud PCs with this provisioning policy, such as operation system language setting.|
|windowsSetting|[cloudPcWindowsSettings](../resources/cloudpcwindowssetting.md)|Indicates a specific Windows setting to configure during the creation of Cloud PCs for this provisioning policy. Supports `$select`. |
|domainJoinConfiguration (deprecated)|[cloudPcDomainJoinConfiguration](../resources/cloudpcdomainjoinconfiguration.md)|Specifies how Cloud PCs join Microsoft Entra ID.|
|onPremisesConnectionId (deprecated)|String|The ID of the cloudPcOnPremisesConnection. To ensure that Cloud PCs have network connectivity and that they domain join, choose a connection with a virtual network that’s validated by the Cloud PC service.|
|windowsSettings (deprecated)|[cloudPcWindowsSettings](../resources/cloudpcwindowssettings.md)|Specific Windows settings to configure during the creation of Cloud PCs for this provisioning policy. Supports `$select`. The **windowsSettings** property is deprecated and will stop returning data on January 31, 2024. Going forward, use the **windowsSetting** property.|

## Response

Expand All @@ -68,9 +70,8 @@ If successful, this method returns a `204 No Content` response code.

### Request

The following is an example of a request.
The following example shows a request.

# [HTTP](#tab/http)
<!-- {
"blockType": "request",
"name": "update_provisioningpolicy"
Expand All @@ -91,44 +92,13 @@ Content-Type: application/json
"imageType": "custom",
"windowsSettings": {
"language": "en-US"
},
"windowsSetting": {
"locale": "en-US"
}
}
```

# [C#](#tab/csharp)
[!INCLUDE [sample-code](../includes/snippets/csharp/update-provisioningpolicy-csharp-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [CLI](#tab/cli)
[!INCLUDE [sample-code](../includes/snippets/cli/update-provisioningpolicy-cli-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [Go](#tab/go)
[!INCLUDE [sample-code](../includes/snippets/go/update-provisioningpolicy-go-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [Java](#tab/java)
[!INCLUDE [sample-code](../includes/snippets/java/update-provisioningpolicy-java-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [JavaScript](#tab/javascript)
[!INCLUDE [sample-code](../includes/snippets/javascript/update-provisioningpolicy-javascript-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [PHP](#tab/php)
[!INCLUDE [sample-code](../includes/snippets/php/update-provisioningpolicy-php-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [PowerShell](#tab/powershell)
[!INCLUDE [sample-code](../includes/snippets/powershell/update-provisioningpolicy-powershell-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

# [Python](#tab/python)
[!INCLUDE [sample-code](../includes/snippets/python/update-provisioningpolicy-python-snippets.md)]
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]

---

### Response

The following example shows the response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ Get the device recommendation reports for Cloud PCs, such as the usage category

## Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see [Permissions](/graph/permissions-reference).
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions [only if your app requires it](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).

|Permission type|Permissions (from least to most privileged)|
|:---|:---|
|Delegated (work or school account)|CloudPC.Read.All, CloudPC.ReadWrite.All|
|Delegated (personal Microsoft account)|Not supported.|
|Application|CloudPC.Read.All, CloudPC.ReadWrite.All|
<!-- { "blockType": "permissions", "name": "cloudpcreports_getcloudpcrecommendationreports" } -->
[!INCLUDE [permissions-table](../includes/permissions/cloudpcreports-getcloudpcrecommendationreports-permissions.md)]

## HTTP request

Expand Down
Loading

0 comments on commit 0b39970

Please sign in to comment.