Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device removal not working #2848

Closed
dotconfig404 opened this issue Jul 15, 2024 · 2 comments
Closed

Device removal not working #2848

dotconfig404 opened this issue Jul 15, 2024 · 2 comments
Labels
no-recent-activity Service issue status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close

Comments

@dotconfig404
Copy link

dotconfig404 commented Jul 15, 2024

Describe the bug

Hi, I am trying to create and delete a device using the Powershell SDK. Device creation works fine, but it subsequently is not able to delete (find?) the created device using the device ID. What could be going on here?

Expected behavior

Should delete device given it's device ID.

How to reproduce

Connect-MgGraph -Scopes "Directory.AccessAsUser.All"

# create a device
$params = @{
	accountEnabled = $false
	alternativeSecurityIds = @(
		@{
			type = 2
			key = [System.Text.Encoding]::ASCII.GetBytes("base64Y3YxN2E1MWFlYw==")
		}
	)
	deviceId = "4c299165-6e8f-4b45-a5ba-c5d250a707ff"
	displayName = "Test device 22"
	operatingSystem = "linux"
	operatingSystemVersion = "9001"
}
New-MgDevice -BodyParameter $params

# delete a device
Remove-MgDevice -DeviceId "4c299165-6e8f-4b45-a5ba-c5d250a707ff"

Disconnect-MgGraph

SDK Version

2.20.0

Latest version known to work for scenario above?

No response

Known Workarounds

none

Debug output

Line |
50 | Remove-MgDevice -DeviceId "4c299165-6e8f-4b45-a5ba-c5d250a707ff"
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Resource '4c299165-6e8f-4b45-a5ba-c5d250a707ff' does not exist or one of its queried reference-property objects are not
| present. Status: 404 (NotFound) ErrorCode: Request_ResourceNotFound Date: 2024-07-15T13:33:27 Headers: Cache-Control
| : no-cache Vary : Accept-Encoding Strict-Transport-Security : max-age=31536000 request-id
| : 05dab850-4b3c-4b6b-87ab-8daaadf76663 client-request-id : 76805b13-2210-4dcd-bbfe-870324398118
| x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"Norway
| East","Slice":"E","Ring":"2","ScaleUnit":"000","RoleInstance":"OSL0EPF00000524"}} x-ms-resource-unit : 1 Date
| : Mon, 15 Jul 2024 13:33:26 GM

Configuration

Name Value


PSVersion 7.4.3
PSEdition Core
GitCommitId 7.4.3
OS Ubuntu 22.04.4 LTS
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Other information

No response

@dotconfig404 dotconfig404 added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Jul 15, 2024
@timayabi2020
Copy link
Contributor

Hi @dotconfig404 from the debug information, there is an indication that something is off with the API and unfortunately, for API related issues/questions we are not best placed to give an answer. Kindly raise an issue here https://developer.microsoft.com/en-us/graph/support so that the API owner can respond to it.

@timayabi2020 timayabi2020 added Service issue status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Jul 25, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-recent-activity Service issue status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close
Projects
None yet
Development

No branches or pull requests

2 participants