sp-starter-kit icon indicating copy to clipboard operation
sp-starter-kit copied to clipboard

Couldn't install the starter kit - I'm getting (403) Forbidden error

Open muges01 opened this issue 6 years ago • 62 comments

Hi,

I'm trying to install the new SharePoint Starter Kit in my tenant but i'm getting 403 error. Can you anyone please guide me on installing this starter kit.

image

Category

  • [ ] Question
  • [X] Bug
  • [ ] Enhancement

Expected or Desired Behavior

Expecting to install the SharePoint starter kit in my tenant.

Observed Behavior

I'm getting 'The remote server returned an error: (403) Forbidden.' error when i run the following Powershell command

'Apply-PnPProvisioningHierarchy -Path starterkit.pnp -Parameters @{"SiteUrlPrefix"="demo_"}'

Note: I'm using a global administrator credential (MSA enabled account) to run the powershell.

Steps to Reproduce

  1. Open SharePoint Online Management Powershell
  2. Run 'Connect-PnPOnline [Tenant URL] -UseWebLogin'
  3. Enter the user credential which has global administrator access
  4. Run 'Apply-PnPProvisioningHierarchy -Path starterkit.pnp -Parameters @{"SiteUrlPrefix"="demo_"}'

Note: I'm using the 'PnP PowerShell for SharePoint Online' version '3.2.1810.0'

Thank you in advance.

muges01 avatar Oct 14 '18 00:10 muges01

Additional Observed Behavior

I have tested this on a tenant which don't have MSA enable and it is working fine.

image

Looks like the issue is with the tenant which has the MSA enabled.

Thank you

muges01 avatar Oct 15 '18 14:10 muges01

Looking for an update on this, encountering the same issue.

ZGremlin avatar Oct 17 '18 16:10 ZGremlin

Same issue for me too, Worse than that : I tried to apply the starter kit in a new Office 365 tenant (created with the developer program, so without MSA enabled) and I have the same behavior...

michaelmaillot avatar Oct 18 '18 17:10 michaelmaillot

Anybody found any solution for this issue yet?

muges01 avatar Oct 23 '18 20:10 muges01

Anybody found any solution for this issue yet?

Unfortunately, no. Nothing yet.

ZGremlin avatar Oct 23 '18 21:10 ZGremlin

Thank you @JeremySColeman I hope someone will be able to help us here. It's looks like something to do with MSA enabled environment.

muges01 avatar Oct 23 '18 21:10 muges01

Hi @VesaJuvonen

I have run the script again and this is the exception details

image

Please let me know, if you need any further information.

muges01 avatar Oct 25 '18 19:10 muges01

Hi @muges01 - this indicates either two things. You do not have app catalog created in your tenant OR you do not have site collection administrator permissions in the app catalog for some reason. Can you check those. Thx.

VesaJuvonen avatar Oct 26 '18 06:10 VesaJuvonen

Hi @VesaJuvonen

I have the same error as @muges01 despite the fact that I am administrator (both site collection and tenant) and I have an App Catalog...

michaelmaillot avatar Oct 26 '18 06:10 michaelmaillot

Hi @VesaJuvonen,

I have checked the two things that you have asked me clarify.

  1. I have app catalog and i have uploaded other SPFx solution to the app catalog successfully
  2. I have site collection administrator permission on App catalog site

Please let me know, if you need any other details.

Thank you

muges01 avatar Oct 26 '18 14:10 muges01

thank you @michaelmaillot for info

muges01 avatar Oct 26 '18 14:10 muges01

Hi @muges01 - this indicates either two things. You do not have app catalog created in your tenant OR you do not have site collection administrator permissions in the app catalog for some reason. Can you check those. Thx.

@VesaJuvonen In my case I am not only a Global Admin but also an explicit Site Collection administrator for all collections on the tenant. Our App Catalog is several years old and has several apps installed. Additionally I verified that I am an Term Store admin and the user profile attribute was created prior to testing.

I tested with my admin account as well as with the default tenant admin account, no luck.

Thanks for the assistance!

ZGremlin avatar Oct 29 '18 14:10 ZGremlin

@muges01 - Can you test following - ensure that you do not have the sppkg file in the app catalog... so delete if it's there. Try re-installation. Share the app catalog status and if the sppkg file is now there.

@JeremySColeman - Can you share the exception details what you get... or is that the same as what was already mentioned above.

Thx.

VesaJuvonen avatar Nov 01 '18 08:11 VesaJuvonen

Hi @VesaJuvonen ,

Sorry for the delay, I have checked my app catalog and there is no sppkg file been deployed.

Thank you

muges01 avatar Nov 01 '18 22:11 muges01

Hi @muges01 To make sure we can (from code) actually resolve the URL of the appcatalog, can you in PowerShell execute the following cmdlet:

Get-PnPTenantAppCatalogUrl

It should return the url to your appcatalog site.

erwinvanhunen avatar Nov 02 '18 13:11 erwinvanhunen

Hi @erwinvanhunen ,

Here is the url of my app catalog https://[tenant].sharepoint.com/sites/appcatalog

image

Thank you

muges01 avatar Nov 02 '18 17:11 muges01

@muges01 - Can you test following - ensure that you do not have the sppkg file in the app catalog... so delete if it's there. Try re-installation. Share the app catalog status and if the sppkg file is now there.

@JeremySColeman - Can you share the exception details what you get... or is that the same as what was already mentioned above.

Thx.

The exception I get is identical to the original post screenshot

ZGremlin avatar Nov 09 '18 22:11 ZGremlin

Hi @VesaJuvonen,

Any updates regarding this issue?

Thank you in advanced

muges01 avatar Nov 15 '18 15:11 muges01

Hi @VesaJuvonen

I have the same issue. If its any help, - it seems that the 403 comes from a POST to /_vti_bin/sites.asmx method GetUpdatedFormDigestInformation ?

Thanks :-)

MortenPedersenDK avatar Nov 21 '18 09:11 MortenPedersenDK

Hi guys,

Any updates on this issue? It's been so long, any suggestion for work around will be good as well.

muges01 avatar Nov 22 '18 16:11 muges01

I noticed that Apply-PnPProvisioningHierarchy has been deprecated. So I tried Apply-PnPTenantTemplate instead, but with same outcome. 403 on POST to /_vti_bin/sites.asmx.

MortenPedersenDK avatar Nov 23 '18 10:11 MortenPedersenDK

hi @VesaJuvonen,

Is there any update on this issue?

muges01 avatar Nov 29 '18 16:11 muges01

Any update on this? I've received both 401 and 403 errors.

tbennett122 avatar Dec 04 '18 20:12 tbennett122

We are trying to repro this. Anyone up for a remote desktop session where we look into your issue from a debug side of the story?

erwinvanhunen avatar Dec 07 '18 13:12 erwinvanhunen

We are trying to repro this. Anyone up for a remote desktop session where we look into your issue from a debug side of the story?

@erwinvanhunen I am getting this now. Can do RD session.

maxali avatar Dec 07 '18 13:12 maxali

@erwinvanhunen I also can do screen share session as well.

muges01 avatar Dec 07 '18 14:12 muges01

Using App Password works fine. Ex: Connect-PnPOnline -Url $tenant-admin.sharepoint.com -Credentials (Get-Credential) and use your App Password

I get (403) Forbidden when I connect using Connect-PnPOnline -UseWebLogin

And (401) Unauthorized when I connect using Connect-PnPOnline -AppId $appId -AppSecret $appSecret

I am guessing that the token returned from ... -UseWebLogin request is connected to $tenant-admin.sharepoint.com and can not be used for SPWebs in <SiteCollections> node.

maxali avatar Dec 07 '18 15:12 maxali

Hi @maxali,

So if we use the app password, we should be able to install the starter kit without any issue. Is that correct?

muges01 avatar Dec 07 '18 15:12 muges01

Hi @maxali,

So if we use the app password, we should be able to install the starter kit without any issue. Is that correct?

It seems so @muges01 . I got it working with App Password.

maxali avatar Dec 07 '18 16:12 maxali

Hi @maxali ,

I tried to use the App Password i'm not getting 403 Forbidden error anymore but i i'm getting the following error image

What am i missing here?

muges01 avatar Dec 08 '18 15:12 muges01