Confused about Sharepoint Spoke setup

jw9
Tera Contributor

Hi,

 

I am trying to setup the Sharepoint Spoke but there is conflicting information about how to

 

The docs detail several steps from creating JKS-certificate to adding JWT keys and JWT provider and then creating the OAuth Profile and connection.

https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/integrationhub-store-spokes/task/configure-ms-sharepoint.html#configure-ms-sharepoint

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0788079

 

This support KB article on the other hand only says to create the OAuth profile and the tenant with a different Token URL than in the docs.

 

I have tried both methods but failed to connect after following all the steps.

 

When following the KB article: Able to Get Oauth token via the Credentials form but getting 401 - Invalid Authorization Token when actually testing the spoke.

 

When following the docs: Not able to get OAuth token via the credentials form - 

OAuth flow failed. Verify the configurations and try again. Error detail:invalid_client, AADSTS700027: Client assertion contains an invalid signature. [Reason - The key was not found., Thumbprint of key used by client: 'xxxxxxxx', Please visit the Azure Portal, Graph Explorer or directly use MS Graph to see configured keys for app Id 'xxxx'. Review the documentation at https://docs.microsoft.com/en-us/graph/deployments to determine the corresponding service endpoint and https://docs.microsoft.com/en-us/graph/api/application-get?view=graph-rest-1.0&tabs=http to build a query request URL, such as 'https://graph.microsoft.com/beta/applications/xxxx']. Trace ID: xxxx Correlation ID: xxxx Timestamp: 2022-03-23 09:00:24Z, https://login.microsoftonline.com/error?code=700027

 

 

1 ACCEPTED SOLUTION

My issue was on the Azure application side. One of the permissions in the Azure App was setup wrong. We did not have delegate and application permissions setup correctly. I think we had the application permission setup as a delegate permission.

  1. Under API Permissions, add the Microsoft Graph permission:
    1. Click Add a permission.
    2. Select Microsoft Graph.
    3. Select Delegated Permissions.
    4. From the Sites list, select Sites.ReadWrite.All permission.
    5. From the User list, select User.Read permission.
    6. Click Add permissions.
  2. Under API Permissions, add the SharePoint permission:
    1. Click Add a permission.
    2. Select SharePoint.
    3. Select Application Permissions.
    4. From the Sites list, select the Sites.FullControl.All permission.
    5. Click Add permissions.

 

View solution in original post

15 REPLIES 15

svani
Tera Contributor

Hi @dan167 ,

 

I have one question to ask here, i know its very to ask anyone please confirm me, once we click to get Oauth Token--which account will be used to get tokens because for me it is not redirecting to sharepoint site to login and get token, directly getting the token.

 

Thanks

Could you please share the solution for the above issue

Saurav Bhardwa2
Tera Contributor

Did you able to resolve this, I am having the same issue. Connection is set up, but I am getting Invalid authorization token in Flow Designer Logs. Would you able to help me with this please?

We have the same problem, all permissions set as required on ServiceNow side.

Manisha Maurya
Tera Contributor

Were anyone able to solve it, after generating aOuth token, flow action gives 401 error 'Invalid Authorization Token'