Skip to main content
Question

FME Server and Sharepoint - Cannot Authenticate


sean.bullock
Contributor
Forum|alt.badge.img+2

Hi all!

 

I have created a FME Workflow in Desktop which connects and runs fine. I then published the workflow to Server and immediately ran the workflow again for it to work fine...for a short while. After some time, the workflow begins to fail with a '401 - Not Authenticated' error.

 

If I go into Web Connections on FME Server and 'Authorise' the Web Connection, I can enter my Sharepoint username and password before approving the permissions. The next screen then appears totally blank. Behind the scenes, Sharepoint is returning the following error; 'the endpoint only accepts POST requests. Received a GET request.”'

 

I've read and followed this article but to no avail; 'Sharepointonline connector - configuration for FME Server 2019.0 (safe.com)'.

 

Any assistance would be warmly welcomed before I pull my remaining hair out!

 

Thanks,

 

Sean

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

What version FME do you use? These are the articles I know of:

How to create a Sharepoint Web Connection (2020.0)

How to create a SharePoint Online Web Connection (2020.1)

I've got it working on server 2019.1.2, the steps I took:

  • Registered an app in Azure.
  • Installed the SharePointOnlineConnector package in desktop.
  • Updated the Client Id and Client Secret in the Microsoft SharePoint Online Web Service as generated in the registered app.
  • Added a Web Connection based on the updated Microsoft SharePoint Online Web Service.
  • Published the SharePointOnlineConnector package to server.
  • Updated the Redirect Uri in the Web Service in Server.
  • Added and authenticated a Web Connection in Server with the same name as in desktop.
  • Published the workspace without overwriting the connection.

sean.bullock
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • May 26, 2021

Thanks for your reply!

 

I am running Server/Desktop version 2020.2.3.

 

I have followed the steps above, but my Redirect URI is currently 'https://login.microsoftonline.com/common/oauth2/nativeclient', though I have also tried 'https://login.microsoftonline.com/[Tenant ID]/oauth2/nativeclient' having set up that URI on the Sharepoint App in Azure.

 

A Redirect URI that uses 'common' results in a 401. A redirect URI that includes the Tenant ID results in a 404.

 

Out of interest, does your FME Server have a public URL? I've seen that mentioned a few times that this should be used as the redirect URI. Currently, my setup does not.

 

Thanks again!


nielsgerrits
VIP
Forum|alt.badge.img+54
sean.bullock wrote:

Thanks for your reply!

 

I am running Server/Desktop version 2020.2.3.

 

I have followed the steps above, but my Redirect URI is currently 'https://login.microsoftonline.com/common/oauth2/nativeclient', though I have also tried 'https://login.microsoftonline.com/[Tenant ID]/oauth2/nativeclient' having set up that URI on the Sharepoint App in Azure.

 

A Redirect URI that uses 'common' results in a 401. A redirect URI that includes the Tenant ID results in a 404.

 

Out of interest, does your FME Server have a public URL? I've seen that mentioned a few times that this should be used as the redirect URI. Currently, my setup does not.

 

Thanks again!

Out of interest, does your FME Server have a public URL? I've seen that mentioned a few times that this should be used as the redirect URI. Currently, my setup does not.

 

Yes our FME server is public and the redirect uri in server is 'https://<fmeserverurl>/fmeoauth' where in desktop it is 'https://login.microsoftonline.com/common/oauth2/nativeclient'.

I'm by no means an expert but if I understand pieces like this or this correctly I believe it need to be different on desktop or server.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings