Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returning the 403 forbidden error #65

Open
1shoaibazhar opened this issue Nov 3, 2023 · 4 comments
Open

Returning the 403 forbidden error #65

1shoaibazhar opened this issue Nov 3, 2023 · 4 comments
Labels
question Further information is requested

Comments

@1shoaibazhar
Copy link

I am using the Fluent Api client, also tried the HTTP client, I am getting the 403 forbidden error with correct credentials

Also attaching the list of api permissions I have granted on Azure
Screenshot 2023-11-03 at 12 07 44 PM
Screenshot 2023-11-03 at 12 08 06 PM
Screenshot 2023-11-03 at 12 05 53 PM

@1shoaibazhar 1shoaibazhar added the bug Something isn't working label Nov 3, 2023
@koltyakov
Copy link
Owner

koltyakov commented Nov 3, 2023

Hi @1shoaibazhar,

You granted Graph permissions. It's a different API.

You need API Permissions -> SharePoint :: Application :: Sites.FullControl.All -> Grant Admin Consent permissions in Azure app registration.

See more:

@koltyakov koltyakov added question Further information is requested and removed bug Something isn't working labels Nov 3, 2023
@1shoaibazhar
Copy link
Author

Hi @koltyakov ,
I have added the sharepoint sites full control as well, it still returns the same 403 forbidden error

@1shoaibazhar
Copy link
Author

@koltyakov , I am using Client Id, Client Secret in the authcnfg

Screenshot 2023-11-03 at 12 47 04 PM

@koltyakov
Copy link
Owner

So it's not an Azure app which is used but legacy Add-in Only? Azure auth uses tenantId, clientId, certPath, certPass parameters. For Add-in auth you have to enable it and also grant permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants