Executed 'Function1' (Failed) The remote server returned an error: (400) Bad Request.[Premium]
.Net framework Azure function is deployed in Docker container WebApp
I am trying to connect Sharepoint online to get the list of changes. For that I am using Microsoft.Sharepoint.Client CSOM dll.(Microsoft.SharePointOnline.CSOM) version 16.1.19404.12000. Initially i am working with .net standard function, then when I try to connect the sharepoint I am getting .The remote server returned an error: (400) Bad Request.. Then I heard that Sharepoint DLL is supportable for .net framework not for .net core / standard. Then I created Azure function 1.0 and ran in local, I could connect the sharepoint.
But when I published to Web App and run the funtion there, i am getting back the same error: .The remote server returned an error: (400) Bad Request.. I found there was a work around is to create a WCF web service and to link it. Apart from that any other way of solution to get rid of the issue.
To Reproduce Steps to reproduce the behavior:
- Go to Visual studio, create Azure function 1.0
- Write code to connect the sharepoint using the above dll mentioned in the description.
- run it locally and you could able to connect the SP succesfully
- publish it to Azure function app of docker enabled web app
- run it in the portal, you could see the error
Expected behavior It should connect as it is in local.
Screenshots
If applicable, add screenshots to help explain your problem
.
Additional context suggestions are welcome. do we have any release from Microsoft on the new future release?
I am same issue as shown above can anyone please help me with this issue.
Thanks in advance.
@akashpanjwani I got fixed by downloading all the dll in a folder and refered the same in my code.