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-AADServicePrinicpalbyDisplayName #12

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

100% Code Coverage for Get-AADServicePrinicpalbyDisplayName #12

markekraus opened this issue Apr 22, 2017 · 0 comments

Comments

@markekraus
Copy link
Owner

Code coverage report:
Covered 0 % of 24 analyzed Commands in Get-AADServicePrinicpalbyDisplayName
Missed commands:

Line Command
76 $DisplayName
77 if (-not $pscmdlet.ShouldProcess($ServiceId)) { ...
80 $Application = $AccessToken.Application
81 $Tenant = $Application.Tenant
82 $Url = '{0}/{1}/{2}?api-version={3}&$filter=displayName+eq+%27{4}%27' -f @( ...
83 $BaseUrl
84 $Tenant
85 'servicePrincipals'
86 $APIversion
87 [System.Web.HttpUtility]::UrlEncode($ServiceName)
89 $Params = @{ ...
90 Uri = $Url
91 Method = 'GET'
92 AccessToken = $AccessToken
93 ErrorAction = 'Stop'
96 $Result = Invoke-GraphRequest @Params
99 $ErrorMessage = "Unable to query User '{0}': {1}" -f $UserId, $_.Exception.Message
100 Write-Error $ErrorMessage
103 $Result.ContentObject.value
104 $OutputObject = $ServiceObject.psobject.copy()
105 $OutputObject.psobject.TypeNames.Insert(0, 'MSGraphAPI.DirectoryObject.ServicePrincipal')
106 $OutputObject
106 Add-Member -MemberType NoteProperty -Name _AccessToken -Value $AccessToken
107 $OutputObject
@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