PSMSGraph icon indicating copy to clipboard operation
PSMSGraph copied to clipboard

100% Code Coverage for Remove-AADAppRoleAssignment

Open markekraus opened this issue 7 years ago • 0 comments

Code coverage report: Covered 0 % of 21 analyzed Commands in Remove-AADAppRoleAssignment Missed commands:

Line Command
70 $AppRoleAssignment
71 if (-not $pscmdlet.ShouldProcess($AppRole.ObjectId)) { ...
74 $AccessToken = $AppRole._AccessToken
75 $Application = $AccessToken.Application
76 $Tenant = $Application.Tenant
77 $Url = '{0}/{1}/{2}/{3}/{4}/{5}?api-version={6}' -f @( ...
78 $BaseUrl
79 $Tenant
80 'users'
81 $AppRole.principalId
82 'appRoleAssignments'
83 [System.Web.HttpUtility]::UrlEncode($AppRole.ObjectId)
84 $APIversion
86 $Params = @{ ...
87 Uri = $Url
88 Method = 'DELETE'
89 AccessToken = $AccessToken
90 ErrorAction = 'Stop'
93 Invoke-GraphRequest @Params
96 $ErrorMessage = "Unable to remove App Assignments for App Role Assignment '{0}': {1}" -f $AppRole.ObjectId, $_.Exception.Message
97 Write-Error $ErrorMessage

markekraus avatar Apr 22 '17 17:04 markekraus