GLPI Oauth authentication to serviceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Eveyone,
Has anyone implemented OAuth authentication between GLPI and ServiceNow?
Here is my configuration:
I created :
- A mid Server
- A rest Message
HTTP Methods:
One method called "test" to initialize the session in GLPI using initSession.
When I test this method, I receive a session_token, so it works correctly.
However, when I try to Get OAuth Token, I reach the authorization page.
When I click "Accept", I get the following error:
HTTP Error 401 - Unauthorized
--
I also created an application Registry for the Get OAuth Token in the form with the necessary data/url for GLPI connection.
The grand type is "Authorization Code" for the registry and for OAuth Entity Profile.
After some analysis, it seems that when I click Get OAuth Token, the function does not work through the MID Server.
However, I’m not sure if this is the actual problem. If it is, I don’t know how to involve the MID Server when clicking Get OAuth Token.
Thank You for your Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ArielN
Share your Oauth_entity profile screen shot.
Also try with grand type is "Client credential" .
Make sure Service account of GLPI having proper permission on that end.
Ensure - you are following this article: https://help.glpi-project.org/documentation/modules/configuration/oauth-clients
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @Tanushree Maiti,
After trying with "client credential", I received this new error "OAuth flow failed. Verify the configurations and try again. Error detail:Invalid null response." I can not reach the page in GLPI.
Here is my Oauth_entity profile
Regarding the application registry:
Default grant type is "Authorization Code"
Authorization URL is http://xxxxxxx/api.php/authorize
Token URL is http://xxxxxxx/api.php/tokne
Redirect URL : https://my-instance.service-now.com/oauth_redirect.do
Send credentials is "As Basic Authorization Header"
In GLPI , I created an OAuth Client, grants "All", Scopes "Api".
In Authorized redirect URLs https://my-instance.service-now.com/oauth_redirect.do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ArielN
in token url , is it typo mistake or in setting this error is there
Token URL is http://xxxxxxx/api.php/tokne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ArielN
Also two things.
Make sure servicenow IP has been added at GLPI end as authorised IP address
in document it is mentioned "inventory" scope needs to add.
Ensure, it is done.
