-
Re: Getting bad request error while passing X-Jive-Run-As header in my dot net application
john_reynolds Apr 17, 2018 5:56 AM (in response to ankit17)Hi Ankit,
Have you enabled those system properties to allow "run as" to work? From the documentation there needs to be a system property added with the schemes that you want to use. As it shows below, this is not enabled by default
Core V3 API - Run-As Feature & Signed Add-Ons
By default, the feature disabled. It is enabled by setting Jive property jive.api.run_as.strategies to a comma-delimited list of identification strategies that may be used to map incoming identities to Jive users. Then, a client app includes an X-Jive-Run-As HTTP header, whose value is a strategy name and corresponding token. Out of the box, four strategies are available: (example header values are in blue)
- uri† - a core v3 person uri - uri /people/1234
- email - an email addresss - email john.doe@jive.jiveon.com
- userid - a Jive userid - userid 1234
- username - a Jive username - username john_doe
If you wanted to enable just username, you would use:
jive.api.run_as_strategies=username
If you want to have all strategies available, make them comma-separated
jive.api.run_as_strategies=username,uri,email,userid
If your community is hosted or on-prem, you can get access to System Properties with Full Access. If you are cloud, you can open a case with support to enable this.
-
Re: Getting bad request error while passing X-Jive-Run-As header in my dot net application
ankit17 Apr 17, 2018 7:39 AM (in response to john_reynolds)1 person found this helpfulHi John,
We did this already. So above setting is already configured in our cloud instance. Please find below screenshot for your reference.
But still, I'm getting a bad request error.
Thanks & Regards,
Ankit Shrivastav
-
Re: Getting bad request error while passing X-Jive-Run-As header in my dot net application
ankit17 Apr 18, 2018 8:24 AM (in response to ankit17)Hi,
Is there anyone who has some insights on this issue ?
Thanks & Regards,
Ankit Shrivastav
-
-
Re: Getting bad request error while passing X-Jive-Run-As header in my dot net application
Robert Hanson Apr 18, 2018 8:33 AM (in response to ankit17)I see two immediate issues with your JSON data...
"categories": [
AssetsandAccelerators
],
The value needs to be quoted. Perhaps this is a copy/paste issue?
"text": "...Commercial Startegy & Transformation..."
The "&" needs to be encoded as &. There are few characters like this that Jive will throw errors on if they aren't encoded.
-
Re: Getting bad request error while passing X-Jive-Run-As header in my dot net application
ankit17 Apr 24, 2018 11:49 PM (in response to Robert Hanson)Hi Robert,
I tried publishing an idea without using X-Jive-Run-As header with that JSON that I have provided and idea got created successfully.
Also, tried correcting "&" to "&", still throwing bad request error with passing X-Jive-Run-As header.
Thanks & Regards,
Ankit Shrivastav
-
Re: Getting bad request error while passing X-Jive-Run-As header in my dot net application
ankit17 Apr 26, 2018 10:32 PM (in response to ankit17)Hi,
I'm able to resolve my issue by parsing my JSON payload.
Thanks & Regards,
Ankit Shrivastav
-
-