msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

Get-MgEntitlementManagementAccessPackageCatalogCustomAccessPackageWorkflowExtension does not work

Open nguyenanhducs opened this issue 3 years ago • 0 comments

The Get-MgEntitlementManagementAccessPackageCatalogCustomAccessPackageWorkflowExtension cmdlet always throw an error below

An item with the same key has already been added.

Script to reproduce the issue

Connect-MGGraph
Select-MgProfile -Name 'beta'
Get-MgEntitlementManagementAccessPackageCatalogCustomAccessPackageWorkflowExtension -AccessPackageCatalogId 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx'

Debug information

DEBUG: [CmdletBeginProcessing]: - Get-MgEntitlementManagementAccessPackageCatalogCustomAccessPackageWorkflowExtension begin processing with parameterSet 'List'.
DEBUG: [Authentication]: - AuthType: 'Delegated', AuthProviderType: 'InteractiveAuthenticationProvider', ContextScope: 'CurrentUser', AppName: 'Microsoft Graph PowerShell'.
DEBUG: [Authentication]: - Scopes: [Application.ReadWrite.All, EntitlementManagement.ReadWrite.All, Group.ReadWrite.All, openid, profile, User.Read, User.ReadWrite.All, email].
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageCatalogs/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/customAccessPackageWorkflowExtensions

Headers:

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Transfer-Encoding             : chunked
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
client-request-id             : xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"Korea Central","Slice":"E","Ring":"3","ScaleUnit":"002","RoleInstance":"SE1PEPF0000382A"}}
Link                          : <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:AADLCM&from=2022-05-01&to=2022-06-01>;rel="deprecation";type="text/html"
Deprecation                   : Mon, 30 May 2022 23:59:59 GMT
Sunset                        : Sat, 25 Jun 2022 23:59:59 GMT
OData-Version                 : 4.0
Cache-Control                 : private
Date                          : Thu, 22 Sep 2022 09:58:57 GMT

Body:
{
  "@odata.context": "https://graph.microsoft.com/beta/$metadata#identityGovernance/entitlementManagement/accessPackageCatalogs('xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx')/customAccessPackageWorkflowExtensions",
  "value": [
    {
      "id": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
      "displayName": "xxxxxxxxx",
      "description": "xxxxxxxxx",
      "createdDateTime": "2022-07-06T08:46:24.143Z",
      "lastModifiedDateTime": "2022-07-06T08:46:24.143Z",
      "clientConfiguration": null,
      "endpointConfiguration": {
        "@odata.type": "#microsoft.graph.logicAppTriggerEndpointConfiguration",
        "subscriptionId": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
        "resourceGroupName": "xxxxxxxxx",
        "logicAppWorkflowName": "xxxxxxxxxx"
      },
      "authenticationConfiguration": {
        "@odata.type": "#microsoft.graph.azureAdTokenAuthentication",
        "resourceId": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx"
      }
    }
  ]
}

DEBUG: [CmdletException]: Received exception with message 'ArgumentException - An item with the same key has already been added. :    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Microsoft.Graph.PowerShell.Runtime.Json.JsonParser.ReadObject()
   at Microsoft.Graph.PowerShell.Runtime.Json.JsonParser.ReadArray()
   at Microsoft.Graph.PowerShell.Runtime.Json.JsonParser.ReadFieldValue()
   at Microsoft.Graph.PowerShell.Runtime.Json.JsonParser.ReadField()
   at Microsoft.Graph.PowerShell.Runtime.Json.JsonParser.ReadObject()
   at Microsoft.Graph.PowerShell.Runtime.Json.JsonParser.ReadNode()
   at Microsoft.Graph.PowerShell.Runtime.Json.JsonNode.Parse(SourceReader sourceReader)
   at Microsoft.Graph.PowerShell.IdentityGovernance.<>c.<IdentityGovernanceEntitlementManagementAccessPackageCatalogsListCustomAccessPackageWorkflowExtensions_Call>b__1599_0(Task`1
 body)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Graph.PowerShell.Cmdlets.GetMgEntitlementManagementAccessPackageCatalogCustomAccessPackageWorkflowExtension_List.<onOk>d__87.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Graph.PowerShell.IdentityGovernance.<IdentityGovernanceEntitlementManagementAccessPackageCatalogsListCustomAccessPackageWorkflowExtensions_Call>d__1599.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Graph.PowerShell.IdentityGovernance.<IdentityGovernanceEntitlementManagementAccessPackageCatalogsListCustomAccessPackageWorkflowExtensions_Call>d__1599.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Graph.PowerShell.IdentityGovernance.<IdentityGovernanceEntitlementManagementAccessPackageCatalogsListCustomAccessPackageWorkflowExtensions>d__1597.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Graph.PowerShell.Cmdlets.GetMgEntitlementManagementAccessPackageCatalogCustomAccessPackageWorkflowExtension_List.<ProcessRecordAsync>d__84.MoveNext()'
Get-MgEntitlementManagementAccessPackageCatalogCustomAccessPackageWorkflowExtension : An item with the same key has already been added.
At line:1 char:1
+ Get-MgEntitlementManagementAccessPackageCatalogCustomAccessPackageWor ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-MgEntitleme...wExtension_List], ArgumentException
    + FullyQualifiedErrorId : Microsoft.Graph.PowerShell.Cmdlets.GetMgEntitlementManagementAccessPackageCatalogCustomAccessPackageWorkflowExtension_List
 
DEBUG: [CmdletEndProcessing]: - Get-MgEntitlementManagementAccessPackageCatalogCustomAccessPackageWorkflowExtension end processing.

nguyenanhducs avatar Sep 22 '22 10:09 nguyenanhducs