# Linkedin OAuth 2.0 settings using elasticsearch

**URL:** <https://discuss.elastic.co/t/linkedin-oauth-2-0-settings-using-elasticsearch/192597>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [July 29, 2019, 3:27am UTC](https://discuss.elastic.co/t/linkedin-oauth-2-0-settings-using-elasticsearch/192597 "2019-07-29T03:27:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![manideep](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@manideep](https://discuss.elastic.co/u/manideep)\
**Post date:** [July 29, 2019, 3:27am UTC](https://discuss.elastic.co/t/linkedin-oauth-2-0-settings-using-elasticsearch/192597/1 "2019-07-29T03:27:25Z")

</div>

Hi All,

I am trying to access the Linkedin content via api using elasticsearch.

I have created a linkedin app and trying to give the access and redirect url to [http://localhost:9200](http://localhost:9200).

after click on the allow button,

![image](https://us1.discourse-cdn.com/elastic/original/3X/8/5/85794521ba4c9100047b7abce7a792d1e9085601.png)

I am getting the error:

{"error":{"root\_cause":[{"type":"illegal\_argument\_exception","reason":"request [/] contains unrecognized parameters: [code], [state]"}],"type":"illegal\_argument\_exception","reason":"request [/] contains unrecognized parameters: [code], [state]"},"status":400}

can anyone tell me where I am going wrong?

my actual goal is to pass the linkedin API URL to logstash and apply some filters and then store in elasticsearch.

Any Ideas?

Thanks,  
Manideep

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [July 29, 2019, 10:03pm UTC](https://discuss.elastic.co/t/linkedin-oauth-2-0-settings-using-elasticsearch/192597/2 "2019-07-29T22:03:37Z")

</div>

It looks like you want to use OAuth2.0 to access Elasticsearch using Linkedin as an Authorization server? As in, you want to login to Elasticsearch with your Linkedin account ? This is unfortunately not possible.

Linkedin [seems to have a custom API/protocol](https://docs.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin?context=linkedin/consumer/context) for a "Sign in with Linkedin" user experience that is based on oAuth2.

Elasticsearch (as of version 7.2) supports [OpenID Connect](https://www.elastic.co/guide/en/elastic-stack-overview/7.2/oidc-guide.html), which is an authentication protocol based on oAuth2 and is considered the de facto standard for authentication based on oAuth2. As long as Linkedin doesn't support OpenID Connect, you won't be able to use it to authenticate to Elasticsearch. Your only option is to implement a [custom realm](https://www.elastic.co/guide/en/elastic-stack-overview/7.2/custom-realms.html#implementing-custom-realm) for Elasticsearch and support Linkedin's protocol.

> [@manideep](#):
>
> my actual goal is to pass the linkedin API URL to logstash and apply some filters and then store in elasticsearch.

Can you clarify this a little further ? This doesn't sound like it requires you/your users to login with Linkedin, but maybe I have misunderstood your use case.

---

<div class="post-metadata">

**Author:** ![manideep](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@manideep](https://discuss.elastic.co/u/manideep)\
**Post date:** [July 30, 2019, 8:29pm UTC](https://discuss.elastic.co/t/linkedin-oauth-2-0-settings-using-elasticsearch/192597/3 "2019-07-30T20:29:26Z")

</div>

Hi @ikakavas,

Thank you for the response and it sounds fair.

I actually want to index the content from public pages in LinkedIn.

I initially thought, I need to use OAuth 2.0 but then realized that it is not possible to sign in every time to get the new access token for every member.

Is there a legal way, that I can index the content or basic members data from public pages in elasticsearch.?

Thanks,  
Manideep

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [July 31, 2019, 6:30am UTC](https://discuss.elastic.co/t/linkedin-oauth-2-0-settings-using-elasticsearch/192597/4 "2019-07-31T06:30:39Z")

</div>

> [@manideep](#):
>
> Is there a legal way, that I can index the content or basic members data from public pages in elasticsearch.?

Hi Manideep,

This question would be exactly the same if you substitute Elasticsearch with anything else, and in that sense I don't think this forum is the best place to get some useful/definitive answer. Maybe you can look at the Linkedin terms of service or ask in a more generic forum

---

<div class="post-metadata">

**Author:** ![manideep](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@manideep](https://discuss.elastic.co/u/manideep)\
**Post date:** [August 1, 2019, 8:26pm UTC](https://discuss.elastic.co/t/linkedin-oauth-2-0-settings-using-elasticsearch/192597/5 "2019-08-01T20:26:32Z")

</div>

Hi @ikakavas

Thank you for your response. I realized this late.

Cheers,  
Manideep

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 29, 2019, 8:26pm UTC](https://discuss.elastic.co/t/linkedin-oauth-2-0-settings-using-elasticsearch/192597/6 "2019-08-29T20:26:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
