Symptoms
When clicking email link to renew the OAuth token on https://url /sites/site_name/, the follow error shows when attempting to run the Appit Registration Wizard:
"We received a bad request"
Diagnoses
The issue appears to be related to bad token. We need to re-associate OAuth token to original Global admin account.
Resolution
Steps below resolved the issue.
i) Login as the existing Global admin user.
ii) Make sure that user also a K2 Server Admin in the management site and site collection admin.
Within the management site’s Tokens page.
a. Delete the token WHERE Resource Type = ‘Microsoft Online’ AND Username= ‘current global admin’
b. Delete the two other tokens WHERE Resource Type = ‘Microsoft Online’ AND Username=’Kuid’
iii) Open a new private browsing session.
iv) Login to SharePoint online as the global admin user.
Run the registration wizard.