as pointed out in this post, ##class(Security.System).ExportAll() does not export the OAuth settings within an environment.
This would be a nice to have for Server Migration but also environment Migration instead of having to build or manually export as it is suggested and import it into the new environment.
Thank you for submitting the idea. The status has been changed to "Planned or In Progress".
This is not a commitment; plans are subject to change. Stay tuned!
Dear @Guest! Thank you for your idea. It is in progress and will be available with future OAuth2 versions.
Hi Staurt:
It wasn't mentioned in the resolution but the other way in import/Export the oauth globals. This worked for our migration