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-AADServicePrincipalAppRoleAssignedTo #11

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

100% Code Coverage for Get-AADServicePrincipalAppRoleAssignedTo #11

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-AADServicePrincipalAppRoleAssignedTo
Missed commands:

Line Command
61 $ServicePrincipal
62 if (-not $pscmdlet.ShouldProcess($ServiceObject.objectId)) { ...
65 $AccessToken = $ServiceObject._AccessToken
66 $Application = $AccessToken.Application
67 $Tenant = $Application.Tenant
68 $SkipToken = $null
70 $Url = '{0}/{1}/{2}/{3}/{4}?api-version={5}{6}' -f @( ...
71 $BaseUrl
72 $Tenant
73 'servicePrincipals'
74 $ServiceObject.objectId
75 'appRoleAssignedTo'
76 $APIversion
77 $SkipToken
79 $Params = @{ ...
80 Uri = $Url
81 Method = 'GET'
82 AccessToken = $AccessToken
83 ErrorAction = 'Stop'
86 $Results = Invoke-GraphRequest @Params
89 $ErrorMessage = "Unable to query App Assignments for service principal '{0}': {1}" -f $ServiceObject.objectId, $_.Exception.Message
90 Write-Error $ErrorMessage
93 $Results.ContentObject.value
94 $OutputObject = $Result.psobject.copy()
95 $OutputObject.psobject.TypeNames.Insert(0, 'MSGraphAPI.DirectoryObject.AppRoleAssignment')
96 $OutputObject
96 Add-Member -MemberType NoteProperty -Name _AccessToken -Value $AccessToken
97 $OutputObject
99 $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