Open quentinmarois opened 11 months ago
Hi @quentinmarois from the debug information this seems like a service issue. You can also confirm that this issue is not only specific to the Microsoft PowerShell SDK by making use of this tool https://developer.microsoft.com/en-us/graph/graph-explorer. by picking the request uri from the debug information and running it on the tool. 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.
So I did a bit more research on the issue, but I'm getting more confused. The API actually seems to behave as expected: In this page and this page of the documentation, it is mentioned that to delete an access package assignment, we need to create a new request with the corresponding type of the initial assignment request.
So for example, if the original assignment request was of requestType AdminAdd
, we create a new request of type AdminRemove
So, it would make sense that the API return an error, because the DELETE
method doesn't exist (although the error status code is a bit misleading as the endpoint does exist, but not the method. A 405 error would make more sense).
The thing that I'm having difficulty understanding now is that, if this is the intended process, wouldn't this mean that the Remove-MgBetaEntitlementManagementAccessPackageAssignement
command should not exist in the first place ?
Thanks for the info @quentinmarois.
I got removal working with New-MgEntitlementManagementAssignmentRequest
.
What's also not.. legit.. with Graph is that I successfully could create the remove request without any write permissions in the scope when I authenticated. I authenticated with:
do {$Disconnected = [bool](-not$(Try{$null = Disconnect-MgGraph 2>$null; $?}Catch{$false}))} until ($Disconnected)
Connect-MgGraph -UseDeviceCode -Scopes ('AuditLog.Read.All','EntitlementManagement.Read.All','User.Read.All') -NoWelcome -ContextScope 'Process'
And the delete request went through, no questions asked.
After that it takes some minutes before the request is "delivered", as in assignment is actually deleted. Then the assignment status is "expired".
This issue is being tracked here https://github.com/microsoftgraph/msgraph-metadata/issues/677
Describe the bug When attempting to use the
Remove-MgBetaEntitlementManagementAccessPackageAssignment
cmdlet with a validAccessPackageAssignmentId
, the azurewebsites API endpoint results in a 404 error.To Reproduce Steps to reproduce the behavior:
Debug Output
Module Version Microsoft.Graph.Beta.Identity.Governance version 2.11.1