Hi @ArunKumar Arumugam ,
Welcome to Q&A forum!
The exception you're encountering, System.NotSupportedException: 'Cannot contact web site 'https://tenent.sharepoint.com/' or the web site does not support SharePoint Online credentials.
, suggests that there may be an issue with the authentication method or permissions associated with the SharePoint site.
Here are some suggestions to resolve the issue:
- Review the SharePoint Site URL: Double-check the SharePoint site URL in your code to ensure it is correct and accessible.
- Check Permissions: Ensure that the user account you are using has the necessary permissions to access the SharePoint site and the specific list.
- Verify Credentials: Double-check that you are using the correct credentials for SharePoint Online. Make sure your username and password are correct and that your account has the appropriate permissions.
- Automatic Login Option: If the error message mentions needing to browse to the site first, try accessing the SharePoint site in a browser and logging in manually to set up the session. Good day!
If the answer is helpful, please click "Accept as Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.