Gerenios / AADInternals

AADInternals PowerShell module for administering Azure AD and Office 365
http://aadinternals.com/aadinternals
MIT License
1.24k stars 214 forks source link

Get-AccessTokenWithRefreshToken -SaveToCache #20

Closed hidden-69 closed 2 years ago

hidden-69 commented 2 years ago

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

hidden-69 commented 2 years ago

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

`

hidden-69 commented 2 years ago

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