SPFx <-> Function Apps

The first test is to ensure the SPFx webparts can call the function apps.

Issue Solution
Error 400: The origin ‘https://tenant.sharepoint.com’ is not allowed. Check the CORS setting for the function app, and validate that it’s set to the SharePoint Online url.
Error 404: The api was not found Validate that the function names are correct.
Error 401: Unauthorized Validate the application registration uri is set correctly in the function app authentication settings and the SPFx webpart settings.
Error 401: Unauthorized Validate the function app variable names and values.
WebPart: Error loading data If the above validations haven’t fixed the issue, perform the following:
1 - Remove the webpart
2 - Republish the page
3 - Edit the page
4 - Add the webpart and configure the settings
5 - Republish the page

Token Validation Failing

Using dev tools, inspect the API call for authentication. If the error message states that the API has not been consented for, then you will need to access the SharePoint Admin Center and click on API under the Advanced section in the left navigation. Validate that the appreg-spark-spoactions api permission is approved and not pending. If the api permission has been approved, validate that the appreg-spark-spoactions matches the application registration name. If not, then a custom SPFx solution must be generated for your environment.

Run Site Collector Job

  1. Access the Azure Automation Accounts
  2. Select the first collector aa-spark-automation0
  3. Review the Variables under Shared Resources
  4. Set v_siteCollectorRunning to 0
  5. Set v_permissionRunbooksRunning to 0

SQL Connection String

The SQL connection string should include MultipleActiveResultSets.

Server=tcp:sql-sparkdb.database.windows.net,1433;Initial Catalog=sqldb-spark;Encrypt=True;MultipleActiveResultSets=True;

Verbose Logging

Set the v_showLogs variable to 1 to show verbose logging.

Unable to Connect to Azure using UAMI

  • Validate the variables for the subscription name and id are correct
  • Validate the variable for UAMI’s client id is set correctly
  • Validate that the UAMI is setup correctly

Out of Memory Exception

  • Consider running the runbook in a Hybrid Worker with 2GB of RAM.
  • For the initial collection, consider scaling the database resource from Basic to Standard/Premium and revert afterwards

No Data in Database

  • Validate the connection string variable to the database

Distribution Lists Management

When testing the Managed-DL-Notifications runbook, if you see the following:

  1. After attempting to connect to exchange, the runbook will fail with no clear explanation
  2. It will give you an Exception Calling Error: “login failed for user … SQL Exception”

Validate the UAMI identity setting in Azure SQL.

Mg-Graph Issues

When connecting to Mg-Graph, you must ensure that WAM is turned off.

[!NOTE] Need to get more info on this from Jacob and apply this where needed during the process.