Skip to content

WebCmdletWebResponseException when calling New-APPermissionReport #27

@mfschumann

Description

@mfschumann

I am trying to generate a list of users that have permissions for a certain repository in an Azure DevOps project, following your tutorial on stack overflow.

After creating the session I run

New-APPermissionReport -Session 'mySession' -InputObject @{
	descriptors = @()
	reportName = 'permReport'
	resources = @(
		@{
		resourceId = 'myProject/myRepo'
		resourceName = 'myRepo'
		resourceType = 'repo'
		}
	)
}

which results in the following error:

In C:\Users\Martin\Documents\WindowsPowerShell\Modules\AzurePipelinesPS\4.0.20\AzurePipelinesPS.psm1:34473 Zeichen:16
+         return Invoke-RestMethod @authenticatedRestMethodSplat
+                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

As far as I can tell the session should be OK, as I can successfully run Get-APBuildList -Session 'mySession' for example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions