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

SPFx solution as Teams Tab (in native client) with Graph : Cannot read property 'match' of undefined

Open AJIXuMuK opened this issue 7 years ago • 9 comments

Category

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

This is a continuation of #3923 that was suddenly closed.

Expected or Desired Behavior

SPFx Solution with MS Graph works in MS Teams Native Clients.

Observed Behavior

Cannot read property 'match' of undefined

TypeError: Cannot read property 'match' of undefined\n    at Function.e._doesErrorCodeExist (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-07-12.003/teams-web-part-application-assembly_default_c33e52dd01c990b5998e189f1fa91786.js:32:118619)
at https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-07-12.003/teams-web-part-application-assembly_default_c33e52dd01c990b5998e189f1fa91786.js:32:122494
at https://pervasent2.sharepoint.com/sites/app-catalog/ClientSideAssets/0e775693-4382-4a73-90f8-8f25ed016338/board-papers-web-part_f3f1be3153e9d900136eaa20858e1bae.js:38:16105
at https://pervasent2.sharepoint.com/sites/app-catalog/ClientSideAssets/0e775693-4382-4a73-90f8-8f25ed016338/board-papers-web-part_f3f1be3153e9d900136eaa20858e1bae.js:38:16237
at MutationObserver.c (https://pervasent2.sharepoint.com/sites/app-catalog/ClientSideAssets/0e775693-4382-4a73-90f8-8f25ed016338/board-papers-web-part_f3f1be3153e9d900136eaa20858e1bae.js:38:20235)

Steps to Reproduce

  1. Create SPFx web part for Teams
  2. add some MS Graph request
  3. Try to run the web part as Teams tab

Steps mentioned in #3923 DOES NOT SOLVE the issue. Screen Shot 2019-07-24 at 10 56 58 AM

Please, do not close the issue until you fix the problem. It has been there since May! And it actually affects release plans for many companies.

AJIXuMuK avatar Jul 24 '19 17:07 AJIXuMuK

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Jul 24 '19 17:07 msft-github-bot

Can you provide me with the SPRequestGuid header of a failed request? The url of the failed request should have 'AcquireOBOToken' in the name.

ghost avatar Jul 24 '19 18:07 ghost

@lahuey it's 637af39e-c0a9-9000-0a27-79e2d6bc0cdb

AJIXuMuK avatar Jul 24 '19 19:07 AJIXuMuK

@AJIXuMuK I looked at the logs, and it seems that SharePoint's Client Secret differs from what's in AAD. If you follow these steps, you should be unblocked

Manual Steps Step 1. Go to -> https://aad.portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview Step 2. Click on SharePoint Online Client Extensibility Web Application Principal Step 3. Click Manifest on the left menu Step 4. Remove all entries in the PasswordCredentials section (Should leave a empty array) Step 5. Save the manifest Step 6. Visit the new API Permission Management Page on the Tenant Admin Site. This creates a client secret behind the scenes. Step 7. Wait 10 minutes

ghost avatar Jul 25 '19 17:07 ghost

Hi @lahuey,

I’ll try that and let you know.

AJIXuMuK avatar Jul 25 '19 18:07 AJIXuMuK

Hey @lahuey,

It works! Thanks for your help!

Feel free to close the issue.

AJIXuMuK avatar Jul 29 '19 22:07 AJIXuMuK

Awesome! Sorry that took so long.

ghost avatar Jul 29 '19 22:07 ghost

I'm having this issue again, after resolving it the first time. What's trange is that this only happens to newly created user accounts or newly added accounts to the Security of the MS Team (as members). I tried doing what was instructed here and it did not resolve my problem. Any help here would be great. IT's effecting a customers implementation.

juanmlarios avatar Nov 12 '19 16:11 juanmlarios

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 24 '20 00:01 msft-github-bot