microsoft-graph-devx-api
microsoft-graph-devx-api copied to clipboard
Incomplete example
Under Example 2: Write extensionAttributes on a device - Request, there are multiple examples.
All of the code examples show how you can set extensionAttribute1 (and thus how you change 2, 3, 4, etc.)
The PowerShell example does not. It just says $params with an empty definition, and doesn't show you how to set the attribute, or specify extensionAttribute1, 2, 3 etc..
Can you please complete the PowerShell example to show how to choose and set the extensionAttribute1, 2, 3 etc. on a device?
Thanks, Lauren
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: a2823c35-1b67-2d65-1585-0c6d6162ef8e
- Version Independent ID: c10ea5e9-24d2-910c-5c10-58cc2188fc1f
- Content: Update device - Microsoft Graph v1.0
- Content Source: api-reference/v1.0/api/device-update.md
- Product: directory-management
- Technology: microsoft-graph
- GitHub Login: @SanDeo-MSFT
- Microsoft Alias: MSGraphDocsVteam
This issue has been assigned to you, @SanDeo-MSFT. You are listed as the author for the document associated with this issue. If this is not correct, please take the following actions.
- Assign this issue to the correct author
- Create a pull request to update the
authorfield in the YAML front-matter of this topic
@msewaweru - Please assist here. Thanks.
@FaithOmbongi , there seems to be an issue with the example generation from the HTTP example. Since the example is autogenerated, would updating it manually be overwritten in future by the process?
@FaithOmbongi , there seems to be an issue with the example generation from the HTTP example. Since the example is autogenerated, would updating it manually be overwritten in future by the process?
@msewaweru - Yes, a manually updated snippet will be overwritten. I see this problem also here Example 4: Add or update the values of a schema extension for a user and affects only PS. Also, this article has many examples for working with different extension types and most PS examples are marked "snippets not available". So this might be pointing to an SDK gap.
In the interim, I've raised a PR to request fresh snippets for the device-update and user-update examples. We can check back in a week to see if the problem is resolved in new snippets.
@FaithOmbongi , there seems to be an issue with the example generation from the HTTP example. Since the example is autogenerated, would updating it manually be overwritten in future by the process?
@msewaweru - Yes, a manually updated snippet will be overwritten. I see this problem also here Example 4: Add or update the values of a schema extension for a user and affects only PS. Also, this article has many examples for working with different extension types and most PS examples are marked "snippets not available". So this might be pointing to an SDK gap.
In the interim, I've raised a PR to request fresh snippets for the device-update and user-update examples. We can check back in a week to see if the problem is resolved in new snippets.
Thanks, @FaithOmbongi.
Per @FaithOmbongi transferring to DevX API repo for snippet generation investigation
Hi @msewaweru - I requested fresh snippets but the example still has an empty $params as per the original issue.
Import-Module Microsoft.Graph.Identity.DirectoryManagement
$params = @{
}
Update-MgDevice -DeviceId $deviceId -BodyParameter $params