Forum Discussion
Adil_Shaikh
Jun 01, 2023Copper Contributor
Sharepoint integration error 401 C#
Hello everyone, We are trying to connect share point via C# we are able to get the Oauth2.0 access token for the share point. After authentication when we try to get site it gives u...
kalpeshvaghela
Jun 27, 2023Iron Contributor
401 Unauthorized error comes when you don't have assigned necessary permission in your Azure AD App Registration or you didn't consent those permission.
You can verify it by accessing https://jwt.io . In this site you can paste on access token generated from your code on left side in "Encoded" section and it right side you would able to see using which scope access token is generate and it will also show necessary permission, client id, scopes etc.
Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community