Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

100% Code Coverage for Get-AADUserAppRoleAssignment #15

Open
markekraus opened this issue Apr 22, 2017 · 0 comments
Open

100% Code Coverage for Get-AADUserAppRoleAssignment #15

markekraus opened this issue Apr 22, 2017 · 0 comments

Comments

@markekraus
Copy link
Owner

Code coverage report:
Covered 0 % of 29 analyzed Commands in Get-AADUserAppRoleAssignment
Missed commands:

Line Command
62 $User
63 if (-not $pscmdlet.ShouldProcess($UserObject.objectId)) { ...
66 $AccessToken = $UserObject._AccessToken
67 $Application = $AccessToken.Application
68 $Tenant = $Application.Tenant
69 $SkipToken = $null
71 $Url = '{0}/{1}/{2}/{3}/{4}?api-version={5}{6}' -f @( ...
72 $BaseUrl
73 $Tenant
74 'users'
75 $UserObject.objectId
76 'appRoleAssignments'
77 $APIversion
78 $SkipToken
80 $Params = @{ ...
81 Uri = $Url
82 Method = 'GET'
83 AccessToken = $AccessToken
84 ErrorAction = 'Stop'
87 $Results = Invoke-GraphRequest @Params
90 $ErrorMessage = "Unable to query App Assignments for service principal '{0}': {1}" -f $UserObject.objectId, $_.Exception.Message
91 Write-Error $ErrorMessage
94 $Results.ContentObject.value
95 $OutputObject = $Result.psobject.copy()
96 $OutputObject.psobject.TypeNames.Insert(0, 'MSGraphAPI.DirectoryObject.AppRoleAssignment')
97 $OutputObject
97 Add-Member -MemberType NoteProperty -Name _AccessToken -Value $AccessToken
98 $OutputObject
100 $SkipToken = $Results.ContentObject.'odata.nextLink' -replace '^.*skiptoken', '&$skiptoken'
@markekraus markekraus added this to the 100% Code Coverage milestone Apr 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant