We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Code coverage report: Covered 0 % of 38 analyzed Commands in Update-GraphOauthAccessToken Missed commands:
Update-GraphOauthAccessToken
[system.uri]::IsWellFormedUriString( ...
$AccessToken
Write-Verbose "Processing token '$($RefreshToken.GUID.ToString())'"
$RefreshToken.GUID.ToString()
If (!$AccessToken.isExpired -and !$Force -and (get-date) -lt $AccessToken.Expires.addseconds(-$RenewalPeriod)) { ...
get-date
Write-Verbose "Token is not expired. Skipping"
$Body = @( ...
'grant_type=refresh_token'
'&redirect_uri={0}' -f [System.Web.HttpUtility]::UrlEncode($RefreshToken.Application.RedirectUri)
'&client_id={0}' -f [System.Web.HttpUtility]::UrlEncode($RefreshToken.Application.ClientID)
'&client_secret={0}' -f [System.Web.HttpUtility]::UrlEncode($RefreshToken.Application.GetClientSecret())
'&refresh_token={0}' -f [System.Web.HttpUtility]::UrlEncode($RefreshToken.GetRefreshToken())
'&resource={0}' -f [System.Web.HttpUtility]::UrlEncode($RefreshToken.Resource)
$Params = @{ ...
Uri = $BaseUrl
WebSession = $RefreshToken.Session
Method = 'POST'
Body = $Body
$RequestTime = Get-Date
$WebRequest = Invoke-WebRequest @Params
$ErrorMessage = $_.Exception.Message
Write-Error "Failed to refresh token: $ErrorMessage"
$Content = $WebRequest.Content ...
$Message = "Failed to convert response from JSON: {0}" -f $ErrorMessage
Write-Error $Message
Write-Error $WebRequest.Content
$RefreshToken.AccessTokenCredential = [pscredential]::new('access_token', $($Content.access_token ...
$Content.access_token
ConvertTo-SecureString -AsPlainText -Force
$RefreshToken.Response = $Content ...
$RefreshToken.RequestedDate = $RequestTime
if ($PassThru) { ...
Write-Verbose "Sending Token to the Pipeline"
$RefreshToken
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Code coverage report:
Covered 0 % of 38 analyzed Commands in
Update-GraphOauthAccessToken
Missed commands:
[system.uri]::IsWellFormedUriString( ...
$AccessToken
Write-Verbose "Processing token '$($RefreshToken.GUID.ToString())'"
$RefreshToken.GUID.ToString()
If (!$AccessToken.isExpired -and !$Force -and (get-date) -lt $AccessToken.Expires.addseconds(-$RenewalPeriod)) { ...
get-date
Write-Verbose "Token is not expired. Skipping"
$Body = @( ...
'grant_type=refresh_token'
'&redirect_uri={0}' -f [System.Web.HttpUtility]::UrlEncode($RefreshToken.Application.RedirectUri)
'&client_id={0}' -f [System.Web.HttpUtility]::UrlEncode($RefreshToken.Application.ClientID)
'&client_secret={0}' -f [System.Web.HttpUtility]::UrlEncode($RefreshToken.Application.GetClientSecret())
'&refresh_token={0}' -f [System.Web.HttpUtility]::UrlEncode($RefreshToken.GetRefreshToken())
'&resource={0}' -f [System.Web.HttpUtility]::UrlEncode($RefreshToken.Resource)
$Params = @{ ...
Uri = $BaseUrl
WebSession = $RefreshToken.Session
Method = 'POST'
Body = $Body
$RequestTime = Get-Date
$WebRequest = Invoke-WebRequest @Params
$ErrorMessage = $_.Exception.Message
Write-Error "Failed to refresh token: $ErrorMessage"
$Content = $WebRequest.Content ...
$Content = $WebRequest.Content ...
$ErrorMessage = $_.Exception.Message
$Message = "Failed to convert response from JSON: {0}" -f $ErrorMessage
Write-Error $Message
Write-Error $WebRequest.Content
$RefreshToken.AccessTokenCredential = [pscredential]::new('access_token', $($Content.access_token ...
$Content.access_token
ConvertTo-SecureString -AsPlainText -Force
$RefreshToken.Response = $Content ...
$RefreshToken.Response = $Content ...
$RefreshToken.RequestedDate = $RequestTime
if ($PassThru) { ...
Write-Verbose "Sending Token to the Pipeline"
$RefreshToken
The text was updated successfully, but these errors were encountered: