I need to connect Office 365 site using console application(c#). but the problem is office 365 tenant having MFA(Multi Factor Authentication) authentication. How can i connect to specific site collection using C#?

Is anyone have worked on console application to connect office 365 having MFA enabled?

  • it gives 403 error straightaway unfortunately. Tried in c# and powershell both, same result. Oct 25, 2016 at 6:49
  • Is there any alternative way to connect? Oct 25, 2016 at 6:50
  • don't think so , for us, we had to remove/disable it for that specific user and then connect Oct 25, 2016 at 6:52
  • stackoverflow.com/questions/25969814/… - read comments on this link, maybe it can give you some idea Oct 25, 2016 at 6:56

1 Answer 1


There is no way to connect to O365 site using c#, microsoft has just released workaround for the powershell


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.