sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

SPFx suddenly stopped working; experimental feature error

Open justdevelopment opened this issue 8 years ago • 40 comments

Category

  • [ ] Question
  • [ ] Typo
  • [X] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

When running in Targeted release, experimental features should work so we can try them out.

Observed Behavior

Starting this morning, tenants return the error "Uncaught (in promise) Error: The requested operation is part of an experimental feature that is not supported in the current environment." when trying to view SPFx webparts using the MSGraphClient

Steps to Reproduce

Add a webpart which uses the MSGraphClient, see that it returns the above error.

We first thought it was our tenants settings, however we're seeing it across all our tenants (at least 5 checked now) with code that was working yesterday evening.

justdevelopment avatar Sep 06 '18 07:09 justdevelopment

This might be related: When I tried reinstalling a webpart that is using the MSGraphClient the API management page is in error.

  • Downloaded previously working package from appcatalog
  • Deleted package from appcatalog
  • (Re)uploaded package to appcatalog
  • Deployed the app
  • Api management portal is not showing permission request but 2 error messages

2018-09-06_1052

RobinBreman avatar Sep 06 '18 08:09 RobinBreman

Thanks @RobinBreman

Hi @justdevelopment There was internal error for MS Graph API early today. Please check it again and for free to reply new updates.

TheMiao avatar Sep 06 '18 09:09 TheMiao

To add to this; I've created a brand new SPFx 1.6 project, added a call to the MSGraphClient and it returns the same error.

image

Additionally, because of the errors @RobinBreman posted, I also can't approve permissions for this new project. This also happens in PowerShell. image [Edit] To be clear, these are two separate tenants with the same errors.

@TheMiao the issue still persists at this point on all our tenants.

justdevelopment avatar Sep 06 '18 09:09 justdevelopment

@TheMiao Has the error been resolved? I still get errors using the graphclient.

RobinBreman avatar Sep 06 '18 09:09 RobinBreman

It appears the App registration for 'SharePoint Online Client Extensibility', which used to be visible in my azure portal, is now missing. This might be why I'm getting the null value errors? Is there any way to get this back, or is this the app registration that was replaced by the 1.6 update? There is no new prinicpal listed, even after redeploying / deploying the 1.6 project.

(as listed in https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-aadhttpclient#considerations)

justdevelopment avatar Sep 06 '18 10:09 justdevelopment

Just to clarify the impact:

Am I right that any solution based on webApiPermissionRequests is literally dead right now?

BigEaseGueldi avatar Sep 06 '18 10:09 BigEaseGueldi

Basically... at least for our 5 tenants. I see there are people who do have it working but have other issues like #2473 and #2475 ~~They do have the SPO Extensibility principal listed so that seems to be the main difference atm.~~ This is aside from the "Experimental feature" error, not sure how that is related....

[Edit] No, not the missing prinicpal. I was looking in the wrong area, it's there. Sorry to put you on the wrong track . I've had a colleague with a different tenant test. They had never deployed the old project, thus never used the preview AAD registration. They can add the project and add permissions correctly.

justdevelopment avatar Sep 06 '18 10:09 justdevelopment

Have previously approved APIs from SPFx 1.4.1 but today they are not available. I see the following errors:

image

No 'SharePoint Online Client Extensibility Web Application Principal' app registration is available in Azure.

The following is displayed when opening API management:

image

AndreasNorefalk avatar Sep 06 '18 12:09 AndreasNorefalk

Thanks for reporting. We are now actively looking into this and trying to get this resolved asap from the engineering side. We will be updating this thread as there are any updates on the progress.

VesaJuvonen avatar Sep 06 '18 15:09 VesaJuvonen

@AndreasNorefalk - Can you give the domain of your the tenant that you saw that error on (just so I can quickly grab error logs)?

GrahamMcMynn avatar Sep 06 '18 16:09 GrahamMcMynn

@AndreasNorefalk - Just so you know the API management screen showing the message "Access to Azure Active Directory resources using the SharePoint Framework will be available soon" is expected for the first 20 minutes after creating the app catalog. The two http 500 errors are not expected. We are working to reduce the time that the error message will show up for to closer to 10 minutes, but that is a work in progress.

GrahamMcMynn avatar Sep 06 '18 17:09 GrahamMcMynn

@justdevelopment / @RobinBreman - could either of you include the correlation ID's and a domain? I just tried to repro this issue and I'm not seeing the error you are seeing. There is a definite issue because multiple people are seeing it, but my test tenant doesn't experience the same problems. Thanks! If you don't feel comfortable putting your domain on this thread please send it to me at my grahamc at microsoft.com email address

GrahamMcMynn avatar Sep 06 '18 17:09 GrahamMcMynn

I've send you an email @mcmynn83

As an aside, the dialog popup Andreas reports should disapear? It's been there the whole week now, on a tenant which has had an app catalog for 2+ years. Shall I report this to the central admin preview people? I thought it was meant to be there for their preview thing.

justdevelopment avatar Sep 06 '18 17:09 justdevelopment

While we are actively investigating the “500 internal server error issues” let me provide an update to another point that has been mentioned in this issue: “Am I right that any solution based on webApiPermissionRequests is literally dead right now?”

Yes, unfortunately you are right. We briefly mentioned it in the 1.6 Release notes:

"On a related note, any permissions that were granted previous to the 1.6.0 release will need to be re-granted, as we have changed which AAD application is used."

But I agree we should have done a better job in communicating it; That's a great feedback and we sure have to put more attention on it in the future.

So technically, the permissions are still there in AAD but it’s correct that they are no longer used by SharePoint Framework. This is an important piece of information.. and I will explain why in just a second but, before that, why did we have to do that?

It has to do with the way we are using AAD behind the scenes: previously we were using an app principal that was defined once and every tenant was having a Service Principal created in their tenancy. That led in some limitations that prevented tenant admins to be able to fully control such principal (because the original App Principal was a Microsoft one .. which is referred as “1st party app principal” in AAD lingo).

Instead, the new design is that we create App Principal on each tenant which now Admins can fully control. The side effect of that decision is that all the previous approved permissions are not in the new app principal

but.. wait: there’s still HOPE!

As I mentioned before the two objects are still there. If you really need all the permission backs you can use AAD portal, look at the previous permissions (under “Home / Enterprise applications / All applications / SharePoint Online Client Extensibility Web Application Principal / Permissions”), and then use the new PowerShell commands we introduced in the GA version of Web APIs to re-add those permissions to the new App Principal.

Hope this helps, Luca

lucaband avatar Sep 06 '18 17:09 lucaband

@justdevelopment - We are currently analyzing the logs with @mcmynn83. No need to report this forward using other routes. You are interacting already with the right people.

VesaJuvonen avatar Sep 06 '18 17:09 VesaJuvonen

There is an active twitter conversation happening, a short term concept is being investigated related to access to your SharePoint tenant admin. You can view the thread here: https://twitter.com/PatMill_MSFT/status/1037774074833862657.

eoverfield avatar Sep 06 '18 19:09 eoverfield

Adding the information to this thread as well, as we are now starting to solve the details and Twitter lenght limitations are no good.

The issue is caused by a situation where the tenant administrator which is being used, is not a site collection administrator of the tenant admin. This seems like a unique situation, but apparently, it's not. You can test the theory by trying to access the following URL as the account having issues - https://YourTenantHere-admin.sharepoint.com/_layouts/15/settings.aspx. If that works, you should be good to go, if that does not work, this is the root cause of your issue.

We are working on a documented workaround and a solution for this. Luckily it seems that the situation is not that common, but clearly, some of you have been experiencing this and we will be looking for a solution until the situation is fully resolved.

VesaJuvonen avatar Sep 06 '18 19:09 VesaJuvonen

@VesaJuvonen How is this possible? I only have 1 user in my dev tenant. So i'am sure the tenant admin is also the site collection admin...

RobinBreman avatar Sep 06 '18 19:09 RobinBreman

@RobinBreman - You might think, but apparently no. There are certain scenarios where this could happen as part of the provisioning. If you try to access the /settings.aspx. you can confirm the situation for you. I'm assuming that you cannot access that based on your message.

We are working on a solution for this and will be updating the situation status to this issue immediately when we have progress.

VesaJuvonen avatar Sep 06 '18 19:09 VesaJuvonen

OK, latest updates on this. We've tracked down the root cause, and it's a bit strange.

Some tenants have the Site Collection Admin for the tenant admin site (mytenant-admin.sharepoint.com) set incorrectly. It should be "Company Administrator", but it winds up with a weird account like YLO001_frm123... When you go to the admin API page, we try and update a property on the web of the admin site collection, but the user doesn't have permissions, and so it fails.

We need to figure out why some of these sites are incorrectly set up, but in the meantime, here is a workaround.

1 - Go to the user page in the Microsoft 365 admin center (https://admin.microsoft.com/adminportal, then select Users->Active Users) 2 - Click Add A User 3 - complete the information, and make sure that you set the License to be "SharePoint Online For Developer" and set the Role to be "Customized Administrator" with "SharePoint Administrator" selected. 4 - Click "Add". 5 - This might take a while.... 6 - Log in to the SP admin center as this new users (tenant-admin.sharepoint.com) 7 - Go to _layouts/15/settings.aspx and select "Site Collection Administrators" under Users and Permissions 8 - delete the incorrect user (hit the X, even if the UX is spinning) 9 - In the little text box, enter "Company Administrator", select the Company Administrator when it resolves, then click "OK". Note - at this point you may get an access denied. Ignore it. 10 - Now log back on with the tenant admin, and hit the API page. 11 - If this is all working, you can delete the user you added.

patmill avatar Sep 06 '18 19:09 patmill