Skip to content

SharePoint App-Only - Not working for me #7476

Description

@amardhanju

[Enter feedback here]
I followed the above instructions but instead of giving tenant wide full control, I tried to provide permission to specific site collection only as shown below.

image
Connect-PnPOnline -Url "https://mytenant.sharepoint.com/sites/mysite" -ClientId "1234567890" -ClientSecret "1234567890"
When I tried to call the api using Pnp, I am getting following error message.
Get-PnPSubWeb -Recurse -IncludeRootWeb
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Either this article is not valid anymore or it requires tenant wide full control to work, which is scary.

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:add-insCategory: SharePoint Add-in Development Modelarea:docs-commentCategory: Comment left on bottom of a docs page here: https://docs.microsoft.com/sharepoint/devtype:archive-old-issueIssues which are closed as tool old for active work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions