Types/MSGraphAPI.Oauth.Exception.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
<# .NOTES =========================================================================== Created with: VSCode Created on: 4/21/2017 6:51 PM Edited on: 4/21/2017 Created by: Mark Kraus Organization: Filename: MSGraphAPI.Oauth.Exception.ps1 =========================================================================== .DESCRIPTION MSGraphAPI.Oauth.Exception Type Definition #> @{ Name = 'MSGraphAPI.Oauth.Exception' Properties = @( @{ MemberType = 'ScriptProperty' MemberName = 'JSONResonse' Value = { if($this.Response.ContentType -match 'application/json' ){ $Stream= $This.Response.GetResponseStream() $StreamReader = New-Object System.IO.StreamReader $Stream $Stream.Position = 0 $StreamReader.ReadToEnd() -replace '\\r\\n',"`r`n" | ConvertFrom-Json } } } ) } |