Change Default App Token Validity

Product: PowerShell Universal
Version: 3.9.6
PowerShell Version: 7.3

I’ve noticed after enabling enhanced app token security that I have tons of tokens generated when using -GrantAppToken (as expected), but they all have the default validity period of one year. I have 19 pages of unexpired tokens. I know there’s less risk of exposure with the enhanced app token security, but it would be cleaner if the tokens had a shorter expiration date. Is there a way to change the default duration of tokens created via the -GrantAppToken parameter of dashboards/apps?

1 Like