Skip to main content

Hi,

 

I am facing this issue while trying to configure K2 for Sharepoint App.

 

When I run the registrations wizard, it successfully configures the first two steps - OAuth Tokens and Claims.

In 'Administrative OAuth Tokens' it redirects to azure and prompts for trust to the app. When I click on trust, it redirects to oserver name]/Identity/token/Home/Error with 'User Not Authorized'. Also, when I expand the exception details tab, there is no information available there.

 

I captured the process from Registration wizard to the error page in fiddler and tried to decipher the flow of requests.

Here is what I interpreted regarding the flow of resquests

 

  • When the user clicks on registration wizard, it first prompts for the k2 designer url.
  • First the OAuth Tokens gets created then the Claims token gets created
  • Then there is a request from the smart form to the k2 server on server]/Identity/authorize/oauth/2 with resourceID etc. as parameters.
  • I guess, on this, the k2 server queries the database for an existing token, and in my case doesnt find it.
  • The callback function gets a 401 not found error. This leads to the callback process intiating a promt for Azure Level trust for the app from the user.
  • When i click on 'trust' in the app, the k2 server is hit with something like i"admin-authorization" = true] as parameter. - I asume at this level the the refresh token gets stored in k2 server.
  • Then call-back function sends a request to server]/Identity/token/oauth/2 (where I guess, it queries for the token that has just been created)
  • Then it redirected to server]/Identity/Home/Error - with message that authorization not successful.

Earlier I had deleted a saved token at - tserver]/Runtime/Runtime/Manage+OAuth+Tokens. It has not been regenerated yet, I think it will be generated once the registration wizard is able to run properly.

 

In the following chart, I think the issue pops up between the steps 13-18.

 

13328iF7958F51EA170FEB.png

 

How do I resolve this Issue?

Any Pointers regarding this would be great help.

 

Thanks

Hi Tejas,

 

This sounds like an issue that requires some thinking. However you mentioned:

  • I guess, on this, the k2 server queries the database for an existing token, and in my case doesnt find it.

Assuming this token does actually exhist, but it is not finding it. Perhaps this is a permissions issue. I would suggest looking through the required permissions and making sure they are configured correctly in SQL and anything else related.

 

 


Reply