Question

oAuth 2.0


Badge +1

I am trying to setup oAuth. When I test the Web Service, I get this:

The endpoint does not support the provided HTTP method

 

I have setup oAuth 2.0 in postman with success. One difference I see is that postman sends a POST for Authorization while FME sends a GET.

 

Any workarounds for this?


15 replies

Userlevel 4
Badge +27

I don't necessarily have an answer, but it would be good to know what service you're trying to authenticate with

Badge +1

Hi @jbradfor​ 

In order to get this working there are two parts

  1. In the First Step, you will create a Web Service for this API or service, Once created now create a Web Connection.
  2. In this step, you will use HTTPCaller to access the service via GET request, and in the transformer set the Authentication to the Web Connection that you created in the first step.

In would be easier if you provide an example of a REST API doc for the service that you are trying to access, but here are some screenshots to accomplish this for the ArcGIS Enterprise feature service.

Create Web Service from OAuth template

OAuth_CreateWebService 

Use HttpCaller to use the Endpoint, this will be very similar to what you have in POSTMAN

OAuth_GenerateToken 

I hope this helps, In HttpCaller you should be able to switch POST to HTTPMethod

Badge +1

Thanks.

Unfortunately, the oAuth service will not authenticate on a GET with our Okta token service. Therefore, the creation of a Web Connection from the Service is not possible either.

 

I was able to use HTTPCaller to authenticate and retrieve a token from our Okta service, but not the best solution.

 

I think FME needs to modify their oAuth 2.0 template to be more flexible and give POST as an option.

Badge +1

Hi @jbradfor​ 

Is it possible for you to share the REST API of the documentation that you are trying to access?

We can definitely try to find a workaround or solution for you.

Based on my knowledge, OAuth 2.0 only requires 3 things

ClientID, ClientSecret, and Redirect URI which should be enough to trigger a Login Page in web services dialog.

On this page, you can pass your User/Pass, you will get directed to OKTA, or other similar applications to conduct Multi-Factor Authentication.

I did find a similar application that claims to have a POST request process(Bentley OpenGround API), I will try to find documentation and account creation to test, but it would be great if you can share the application/rest API documentation .

 

Badge +2

Hi @jbradfor​ 

Is it possible for you to share the REST API of the documentation that you are trying to access?

We can definitely try to find a workaround or solution for you.

Based on my knowledge, OAuth 2.0 only requires 3 things

ClientID, ClientSecret, and Redirect URI which should be enough to trigger a Login Page in web services dialog.

On this page, you can pass your User/Pass, you will get directed to OKTA, or other similar applications to conduct Multi-Factor Authentication.

I did find a similar application that claims to have a POST request process(Bentley OpenGround API), I will try to find documentation and account creation to test, but it would be great if you can share the application/rest API documentation .

 

Hi there,

@rahulsharma​ have you had any luck with the Bentley OpenGround API? We are struggling to get FME Desktop to successfully retrieve a token. @jennaatsafe​ has tried to assist with this, but has also had some difficulty. Are you able to touch base with her and see if you have any luck?

Regards,

Marc

Badge +1

The API we are calling is an internal API, offered by our security team, that wraps okta auth. Therefore, I cannot share those details.

 

That API does not offer GET, POST only for security reasons.

 

Postman uses POST so we are able to call the API successfully.

 

FME oAuth 2.0 does not offer POST, so the call fails.

Badge

Hi there,

@rahulsharma​ have you had any luck with the Bentley OpenGround API? We are struggling to get FME Desktop to successfully retrieve a token. @jennaatsafe​ has tried to assist with this, but has also had some difficulty. Are you able to touch base with her and see if you have any luck?

Regards,

Marc

Hi @mgg_beca​, the workaround I shared via email using 2 HTTPCallers is similar to the workaround jbardfor was able to get working. However, I agree that this isn't an ideal solution. Please let me know if you were able to move on in your workflow process!

Badge +2

Hi there,

@rahulsharma​ have you had any luck with the Bentley OpenGround API? We are struggling to get FME Desktop to successfully retrieve a token. @jennaatsafe​ has tried to assist with this, but has also had some difficulty. Are you able to touch base with her and see if you have any luck?

Regards,

Marc

Hi Jenna,

 

I wasn't able to get this to work unfortunately.

 

Thanks,

Marc

Hi there,

@rahulsharma​ have you had any luck with the Bentley OpenGround API? We are struggling to get FME Desktop to successfully retrieve a token. @jennaatsafe​ has tried to assist with this, but has also had some difficulty. Are you able to touch base with her and see if you have any luck?

Regards,

Marc

Hi Jenna,

 

I am also trying to connect to the Bentley OpenGround API and am having similar issues. Could you send me your 2 HTTPCaller workaround you figured out?

 

Thanks,

Aaron

Hi there,

@rahulsharma​ have you had any luck with the Bentley OpenGround API? We are struggling to get FME Desktop to successfully retrieve a token. @jennaatsafe​ has tried to assist with this, but has also had some difficulty. Are you able to touch base with her and see if you have any luck?

Regards,

Marc

Hey @jennaatsafe​ 

 

Is there any chance you could send me the work around?

 

 

Thanks,

Aaron

Badge

Hi there,

@rahulsharma​ have you had any luck with the Bentley OpenGround API? We are struggling to get FME Desktop to successfully retrieve a token. @jennaatsafe​ has tried to assist with this, but has also had some difficulty. Are you able to touch base with her and see if you have any luck?

Regards,

Marc

Hi @aaron_chaput​ , this is the same workspace I shared with @mgg_beca​. Let me know if this works for you. I've filed a ticket to implement retrieving an OAuth Ticket using HTTP Post in FME (FMEENGINE-76689). Hopefully we will see support for this feature in the HTTPCaller in the near future.

Badge +2

Hi there,

@rahulsharma​ have you had any luck with the Bentley OpenGround API? We are struggling to get FME Desktop to successfully retrieve a token. @jennaatsafe​ has tried to assist with this, but has also had some difficulty. Are you able to touch base with her and see if you have any luck?

Regards,

Marc

Hi @aaron_chaput​ ,

 

let us know how you go with this.

 

We didn't have any luck.

 

Cheers,

Marc

Hi there,

@rahulsharma​ have you had any luck with the Bentley OpenGround API? We are struggling to get FME Desktop to successfully retrieve a token. @jennaatsafe​ has tried to assist with this, but has also had some difficulty. Are you able to touch base with her and see if you have any luck?

Regards,

Marc

I would just mention that we are facing the same challenges.

We build our way around it with HTTP callers, but we "vote up" for the ticket implementation 😊

 

Kind regards,

Fran

Badge +2

Hi there,

@rahulsharma​ have you had any luck with the Bentley OpenGround API? We are struggling to get FME Desktop to successfully retrieve a token. @jennaatsafe​ has tried to assist with this, but has also had some difficulty. Are you able to touch base with her and see if you have any luck?

Regards,

Marc

Hi @fran-gd​ 

Is there any chance you could send through a copy of your working workbench with HTTP Callers?

 

THanks,

Marc

Hi there,

@rahulsharma​ have you had any luck with the Bentley OpenGround API? We are struggling to get FME Desktop to successfully retrieve a token. @jennaatsafe​ has tried to assist with this, but has also had some difficulty. Are you able to touch base with her and see if you have any luck?

Regards,

Marc

Hi @mgg_beca​,

 

I am afraid I cannot do that because of security concerns, but I have not used anything far beyond common tools:

imageThe token endpoint I have to consume accepts only HTTP Post, so I select the method on the HTTP caller and populate the body in the attribute manager right before it.

Note: If this does not work for you I recommend to read the endpoint documentation. In my case, due to security measures in my particular case, I have to provide very specific header parameters besides the body to get it to work... But this just depends on the endpoint you are consuming.

 

I am by no means an expert (this is one of my first posts 😅), but if you share any error messages you might receive maybe I or the community can help you further.

 

Cheers,

Fran

 

Reply