microsoftgraph / microsoftgraph/msgraph-sdk-powershell
Remove-MgBetaDeviceManagementDomainJoinConnector returns 403
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 898
- Forks
- 230
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 31
Description
Describe the bug
Attempting to remove an old connector as Global Admin and Scope "DeviceManagementConfiguration.ReadWrite.All". Invoking Remove-MgBetaDeviceManagementDomainJoinConnector returns the following:
Status: 403 (Forbidden)
ErrorCode: UnknownError
Date: 2026-07-31T19:24:09
Expected behavior
It should delete the connector without error.
How to reproduce
Install-Module -Name "Microsoft.Graph.Beta.DeviceManagement.Administration" -Scope CurrentUser -Repository PSGallery
Connect-MgGraph -Scopes DeviceManagementConfiguration.ReadWrite.All
Remove-MgBetaDeviceManagementDomainJoinConnector -DeviceManagementDomainJoinConnectorId "fc4a3994-9d48-4be9-91a5-02f7cf1c1a62"
SDK Version
2.38.1
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
No response
Configuration
PSVersion 7.6.3
PSEdition Core
GitCommitId 7.6.3
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Other information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing Remove-MgBetaDeviceManagementDomainJoinConnector from the Microsoft.Graph.Beta.DeviceManagement.Administration module with the reported scope and connector ID. Inspect the generated request and 403 response, then compare the cmdlet behavior with the required Microsoft Graph permissions. Done means identifying and correcting the SDK or request issue so the connector deletion succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- api, authorization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100