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-AADUserByID #16

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

100% Code Coverage for Get-AADUserByID #16

markekraus opened this issue Apr 22, 2017 · 0 comments

Comments

@markekraus
Copy link
Owner

Code coverage report:
Covered 0 % of 23 analyzed Commands in Get-AADUserByID
Missed commands:

Line Command
74 $ObjectId
75 if (-not $pscmdlet.ShouldProcess($UserId)) { ...
78 $Application = $AccessToken.Application
79 $Tenant = $Application.Tenant
80 $Url = '{0}/{1}/{2}/{3}?api-version={4}' -f @( ...
81 $BaseUrl
82 $Tenant
83 'users'
84 $UserId
85 $APIversion
87 $Params = @{ ...
88 Uri = $Url
89 Method = 'GET'
90 AccessToken = $AccessToken
91 ErrorAction = 'Stop'
94 $Result = Invoke-GraphRequest @Params
97 $ErrorMessage = "Unable to query User '{0}': {1}" -f $UserId, $_.Exception.Message
98 Write-Error $ErrorMessage
101 $OutputObject = $Result.ContentObject.psobject.copy()
102 $OutputObject.psobject.TypeNames.Insert(0, 'MSGraphAPI.DirectoryObject.User')
103 $OutputObject
103 Add-Member -MemberType NoteProperty -Name _AccessToken -Value $AccessToken
104 $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