Forum Discussion

Adil_Shaikh's avatar
Adil_Shaikh
Copper Contributor
Jun 01, 2023

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 us an error (401) Unauthorized.

Can someone from the community can help us to resolve this issue happy to share more details regarding this integration we are trying.

 
 
 
 
 

1 Reply

  • Adil_Shaikh 

     

    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

     

     

Resources