microsoftgraph / msgraph-sdk-powershell

Powershell SDK for Microsoft Graph
https://www.powershellgallery.com/packages/Microsoft.Graph
Other
696 stars 168 forks source link

Get-MgDeviceManagementDeviceConfigurationOmaSettingPlainTextValue doesn't return anything #1050

Closed hstrang closed 2 years ago

hstrang commented 2 years ago

Get-MgDeviceManagementDeviceConfigurationOmaSettingPlainTextValue does not return anything using ID values that give the expected result using Graph Explorer. Calling with invalid IDs return error messages so the function is at least making the API calls and is not completely a no-op.

peombwa commented 2 years ago

Thanks for bringing this to our attention. The issue is due to how the response object is described in the OpenAPI file that the SDK is generated from. We are already tracking the bug in #834, and a fix will be provided by https://github.com/microsoftgraph/microsoft-graph-devx-api/issues/726.

A workaround is to use Invoke-MgGraphRequest, as shown below, to make the same request:

Invoke-MgGraphRequest -Uri "v1.0/deviceManagement/deviceConfigurations/$deviceConfigurationId/getOmaSettingPlainTextValue(secretReferenceValueId='$ValueId')"
peombwa commented 2 years ago

Closing as duplicate of #834.