Home > Forum > Data sources > Error when connecting to SharePoint online

Error when connecting to SharePoint online
0

I have a problem to establish a connection to sharepoint online.
I have chosen as connection type sharepoint online. When I enter the Url of the sitecollection and the user and password correctly, I get the Error message: "Unable to connect to the remote Server. The sign-in name or password does not match one in the Microsoft account system."
As the account that I use to connect has not MFA enabled the reason for the error must be, that webcon uses legacy authentication, which is not allowed on our tenant due to conditional access policies.
So my question is, if there isn't another authentication possibility at webcon?
We actually use Version 2023.1.2.99. Could it be, that the problem would be solved on a newer Version?

In reply to: Daniel Krüger (Cosmo Consult)

Hi Mathias,

what do you want to achieve? An alternative to the SharePoint actions would be do implement your use case via the REST API.
This way you could use other authentication methods like OAuth with a Microsoft Entra Application registration with client ID and secret.

Best regads,
Daniel

Hi Daniel

It would be an option to use the SharePoint Rest API but I don't know, how to set up the connection in Webcon. I manged to set up a connection in Postman but I don't know how to do it in Webcon.

I can establish a connection to Graph API in Webon but the graph api doesn't provide the same functionality as the sharepoint API, e.g. ensureUser and for that is no option.

MVP
In reply to: Schönholzer Mathias - MSc

Hi Daniel

It would be an option to use the SharePoint Rest API but I don't know, how to set up the connection in Webcon. I manged to set up a connection in Postman but I don't know how to do it in Webcon.

I can establish a connection to Graph API in Webon but the graph api doesn't provide the same functionality as the sharepoint API, e.g. ensureUser and for that is no option.

Hi Mathias.

I also wasn't able to connect with the default mechanisms.
Therefore I created a global automation which gets the access token. The access token is then used in the subsequent requests.

Get access token
1) Anonymous authentication
2) Endpoint
https://accounts.accesscontrol.windows.net/#{AUTP_Value:51}#/tokens/oAuth/2
3) body
grant_type - client_credentials
client_id - #{AUTP_Value:56}#@#{AUTP_Value:51}#
client_secret - #{AUTP_Value:57}#
resource - 00000003-0000-0ff1-ce00-000000000000/#{AUTP_Value:52}#@#{AUTP_Value:51}#
4) The created parameters
5) assign he access token to the output parameter
6) Another automation calling the global automation
7) Anonymous REST action with the custom Authorization

Best regards,
Daniel