microsoftgraph / msgraph-sdk-powershell

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

Remove-MgEntitlementManagementCatalogResource not finding resource to delete #2329

Closed tnsholding closed 10 months ago

tnsholding commented 1 year ago

Describe the bug Trying to use Remove-MgEntitlementManagementCatalogResource to remove an existing resource from an existing Entitlement management catalog.

To Reproduce Steps to reproduce the behavior: Created a resource in the catalog based on Entra ID group. I can get a reference to the existing resource with (groupId being the objectId of the group added as a resource):

$existingGroupResource = Get-MgEntitlementManagementCatalogResource -AccessPackageCatalogId $catalogId | ? { $_.originId -eq $groupId }

If I then try to remove the resource with the following command ($catalogId being ID of the existing catalog):

Remove-MgEntitlementManagementCatalogResource -AccessPackageCatalogId $catalogId -AccessPackageResourceId $existingGroupResource.Id

I get the following error; _Remove-MgEntitlementManagementCatalogResourceDelete: No HTTP resource was found that matches the request URI 'https://igaelm-asev3-ecapi-neu.igaelm-asev3-environment-neu.p.azurewebsites.net/api/v1/catalogs('2df70db4-af69-4d9f-b2da-0357b238aef2')/resources('525190af-1acd-44be-968c-b320ec712d9a')'. Status: 404 (NotFound)

Expected behavior Expected the cmdlet to find and delete the resource.

Debug Output

Run the problematic command with -Debug and paste the resulting debug stream below. ⚠ ATTENTION: Be sure to remove any sensitive information that may be in the logs.

Module Version Microsoft.Graph.Identity.Governance v 2.6.1

Environment Data Name Value


PSVersion 7.2.14 PSEdition Core GitCommitId 7.2.14 OS Microsoft Windows 10.0.22631 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

timayabi2020 commented 10 months ago

@tnsholding thank you for identifying and logging this issue. I tried reproducing the issue and I got the same results even with the latest SDK version. Based on the debug information this is actually a service issue and 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.

microsoft-github-policy-service[bot] commented 10 months ago

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.