Hi,
I created c# code to be able to create new item in share point list. it throw me error message as following.
"Cannot contact web site 'xxxxxxxx' or the web site does not support SharePoint Online credentials. The response status code is 'Unauthorized'.
"Sharepoint the remote server returned an error (401) unauthorized"
It is because of I need admin right to create item under list. but I am able to create manully from share point portal.
is there anyone help me regarding this issues?
Thanks,
Mohamed Azarudeen ZPosted Jul 10, 2023, 1:06 PM
Hi
To resolve this issue, you have a few options:
Use an account with administrative rights: Ensure that you're using an account with administrative rights or an account that has the necessary permissions to create items in the SharePoint list. You may need to coordinate with your SharePoint administrator to grant the appropriate permissions to your account.
Grant necessary permissions to your current account: If you're unable to use an account with administrative rights, you can try granting the necessary permissions to your current account. Depending on the SharePoint configuration and security policies in place, this may or may not be feasible. You can work with your SharePoint administrator to assign the required permissions to your account.
Use an app-based authentication mechanism: SharePoint provides the ability to authenticate using app-based authentication mechanisms, such as OAuth. This allows your application to authenticate with SharePoint using its own credentials, independent of any user account. App-based authentication typically requires additional configuration and setup in SharePoint, including registering the application and granting it the necessary permissions. You can refer to SharePoint's documentation or consult with your SharePoint administrator for guidance on setting up app-based authentication.
Hope this helps