This is a migrated thread and some comments may be shown as answers.

2 Step Authentication not working

6 Answers 434 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Harsimrat
Top achievements
Rank 1
Harsimrat asked on 21 Mar 2019, 02:48 AM

We are trying to access our own servers using Web Data Source and are having issues with 2 Step Authentication. I have attached the screenshot with this email on how we have set it up, and on final page when we click Download, we get 401 unauthorized.

The same Url and body parameters are working through Postman. I was wondering if you can please help us identify what maybe wrong?

6 Answers, 1 is accepted

Sort by
0
Harsimrat
Top achievements
Rank 1
answered on 22 Mar 2019, 05:29 AM

I was able to figure this out. Content-Type: Application/json needs to be added as header parameter for this to succeed.

0
Silviya
Telerik team
answered on 22 Mar 2019, 09:34 AM
Hi Harsimrat,

Indeed, Content-Type: Application/json added as a parameter with type Header would retrieve the data. I'm happy that you've already figured it out.

Best Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Noah
Top achievements
Rank 1
answered on 17 Apr 2020, 04:57 PM
I'm running into a similar issue and I am not able to figure out how to create the Content-Type parameter.  Could you provide an example of this with a screenshot?
0
Noah
Top achievements
Rank 1
answered on 20 Apr 2020, 01:48 PM
I upgraded from version 13.2.19.1030 to 14.0.20.219 and I was then able to set ContentType on the datasource.
0
Javier
Top achievements
Rank 2
Veteran
answered on 08 Mar 2021, 04:00 PM

I have the R1 2021 version and despite configuring the form for two-step authentication, we still can't get it to connect, it gets a BadRequest error. We attach images of the configuration and the response obtained when invoking the API.

 

Thanks,

Javier

0
Dimitar
Telerik team
answered on 11 Mar 2021, 11:16 AM

Hello Javier,

Let me start by answering one of your earlier questions, setting the Content-Type header can be done the following way.

Regarding the error, 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

Could you please check if the request works as expected with a tool like Postman for example? Are you sure that the data is correct?

Let me know if you have any updates on the isue.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Liana Andreea
Top achievements
Rank 1
commented on 24 Jul 2023, 02:18 PM

Hi all, 

I struggled with the same 400 Bad Request and I managed to figure out what was wrong. Hopefully my discovery will help others save time. 

First off... yes, make sure your request works with Postman and you are receiving the access token.

If the request works in Postman, but not the Report Designer, you could install Fiddler, enable it temporarily as your System Proxy and monitor the Live Traffic to see the actual request the Report Designer is sending and the response it's receiving. Based on that, hopefully you will get more information and fix the issue.

In my case I was requesting an access token from Azure AD, but my request was not formed properly. The issue was that I was I was sending the client_id, client_secret, grant_type and scope in the body as a JSON.  Instead the correct approach is to send them in the body as x-www-form-urlencoded, key value pairs separated by &, as following:

client_id=<clientID>&client_secret=<clientSecret>&grant_type=client_credentials&scope=<scope>

I also added the headers Content-Type: application/x-www-form-urlencoded and Acceptapplication/json in my request (in the Configure authentication parameters wizard window) and it worked like magic.

Another important thing is to make sure that you are using a correct regular expression for the Token Path, capable of capturing the access token. In my case, with the response from Azure AD the following works great:

(?:"access_token"\s*:\s*")([^"]*)(?:")*

 

Tags
Report Designer (standalone)
Asked by
Harsimrat
Top achievements
Rank 1
Answers by
Harsimrat
Top achievements
Rank 1
Silviya
Telerik team
Noah
Top achievements
Rank 1
Javier
Top achievements
Rank 2
Veteran
Dimitar
Telerik team
Share this question
or