Error when searching for Azure Active Directory users:
"Exception has been thrown by the target of an invocation. OAuth token requires authorization. "
Executing the UMUser Get Users method where Label='AAD' returns the error.
The steps below were based on an environment using Azure Active Directory but is not integrated with SharePoint Online.
- Open the K2 Management Site.
- Expand the Integration node.
- Go to Service Instances.
- Select the Azure Active Directory service instance.
- You may choose to either click on Edit or Refresh Service Instance.
- If you chose Edit, click on OK to update the instance.
- You should see an OAuth Error with message Redirecting for Authorization. Retry after successful authorization.
- If you are prompted to login, provide the credentials of the AAD Tenant Admin.
- This should redirect to a page showing Authorization Successful.
If SharePoint Online is in use, try running the Registration Wizard.