Gerenios / AADInternals

AADInternals PowerShell module for administering Azure AD and Office 365

Home Page:http://aadinternals.com/aadinternals

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get-AccessTokenWithRefreshToken -SaveToCache

hidden-69 opened this issue · comments

I couldn't find this, how and for what duration are the tokens saved to Cache?

I'm getting errors saving credentials to cache, this doesn't seem to work while $response is valid and tokens have been received.

`
$Script:refresh_tokens["$ClientId-$Resource"] = $response.refresh_token

Cannot index into a null array.
At C:\Program Files\WindowsPowerShell\Modules\AADInternals\0.6.6\AccessToken.ps1:1601 char:13

  •         $Script:tokens["$ClientId-$Resource"] =         $response ...
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : NullArray

`

One more question, on requesting a access code with refresh code, do you also refresh the access code?