O365 activity for downloading Sharepoint List attachments

Hi,

Sharing what we researched around this error:

This error occurs because legacy authentication has been blocked in many organizations.
This can be verified by checking with your org admin.

To get around this error, users need to be excluded from legacy authentication blocking.

Refer below post on how:

However, we couldn’t get the user excluded in our org for allowing usage of legacy authentication due to security concerns but it really is the root cause of this error.

Furthermore, we tried to switch to modern auth using O365 api but it has a limitation - it can’t fetch attachment URLs from sharepoint list items, so we ended up trying below solutions:

  1. Fetch attachments details from sharepoint list via http request. This step should work but didn’t work in our case due to access issues, seems like app id and secret had some restrictions which we have not been able to resolve yet.
  2. So, we created a power automate flow to fetch attachment details. Call that PA flow using http request from UiPath and collect the response. This worked like a charm!

Also, linking below posts on discussions/suggestions around same.

Hope this helps someone struggling with this issue.

Regards
Sonali