Troubleshooting

Summary

Issues may occur when using Valo Teamwork. Therefore, we have listed below different ways how to deal with them.

Enable log in Azure Functions

Detailed logging during Teams extraction

By default, Teamwork won't output detailed information about the teams extraction. In order to activate detailed logging, you have to navigate to Home > Function App > tenant-teamwork-functions > Configuration and set the app setting TeamworkUseDebugLogging to true.

Enable log in Azure App Service Plan

Detailed logging during Teams provisioning

By default, Teamwork won't output detailed information about all the steps during teams provisioning. In order to activate detailed logging, you have to navigate to Home > App Services > tenant-valo-appservice > Configuration and set the app setting TeamworkUseDebugLogging to true.

Note

As default the web job log history spans to the last 12 hours. This is because the default amount of web job invocations that are kept is 50 and with 15 minutes interval execution it counts up to 12 hours. If you want to keep more web job log history, you can change the value with adding app setting WEBJOBS_HISTORY_SIZE and increase the value from 50. For example value 200 will give you 48 hours of web job log history.

Use special query string parameters with browser console

By default Teamwork doesn't writes debug information to browser console in order to avoid its flooding. In order to add debug information to the console several special query string parameters may be used:

Param Description Example
?valodebug=1 Add common debug information to the console log https://{tenant}.sharepoint.com/sites/teamwork?valodebug=1
?ValoDebugGroupsLoading=1 Add debug information related only with groups loading process https://{tenant}.sharepoint.com/sites/teamwork?ValoDebugGroupsLoading=1
?ValoDebugCreateOrder=1 Add debug information related with groups and sites ordering process https://{tenant}.sharepoint.com/sites/teamwork?ValoDebugCreateOrder=1

To see the debug information, open browser console and reload the page with ?valodebug=1 query string param. Check errors and information messages there.

Troubleshoot authentication problems

If Teamwork shows errors related with authentication, please check the following:

  • {tenant}-valo-tokens AAD app

    1. check that client id stored in ValoAadClientId tenant property.
    2. Ensure that client id is the same as app id of {tenant}-valo-tokens AAD app on this tenant.
    3. Ensure that same {tenant}-valo-tokens AAD app id stored in TeamworkAppId app setting for Teamwork app service and Azure functions
    4. Double check that permissions of {tenant}-valo-tokens AAD app are configured like described here: and ensure that admin consent is granted
    5. Ensure that "Treat application as a public client" property for Valo Tokens app is set to yes: https://docs.valointranet.com/teamwork/install/manual/manual-install/#set-defaul-client-app-to-public
    6. Ensure that reply urls for Valo Tokens app are configured properly: https://docs.valointranet.com/teamwork/install/manual/manual-install/#reply-uris-to-tenant-valo-tokens-aad-app
    7. Check manifest of Valo Tokens app: oauth2AllowIdTokenImplicitFlow and oauth2AllowImplicitFlow should be set to true and oauth2Permissions should not be empty
    1
    2
    3
    4
    5
    "oauth2AllowIdTokenImplicitFlow": true,
    "oauth2AllowImplicitFlow": true,
    "oauth2Permissions": [
    ...
    ]
    
  • [tenant]-teamwork-functions AAD app

    1. ensure that permissions for [tenant]-teamwork-functions app are configured properly from here:
    2. navigate to [tenant]-teamwork-functions AAD app > Overview and ensure that Application ID URI is set to https://{tenant}-teamwork-functions.azurewebsites.net
    3. navigate to [tenant]-teamwork-functions AAD app > Branding and ensure that Home page URL is set to https://{tenant}-teamwork-functions.azurewebsites.net
    4. navigate to [tenant]-teamwork-functions AAD app > Authentication and ensure that Reply URI for Web platform is set to https://{tenant}-teamwork-functions.azurewebsites.net/.auth/login/aad/callback
  • [tenant]-teamwork-functions Azure function app

    1. navigate to [tenant]-teamwork-functions Function app > Authentication > Azure AD (advanced) and ensure that authentication properties contain correct values:
      1. Client ID - should contain app id of [tenant]-teamwork-functions AAD app (NOT app id of Valo Tokens app)
      2. Issuer Url - should contain https://sts.windows.net/{tenantId}
      3. Client Secret - should contain client secret of [tenant]-teamwork-functions AAD app (NOT client id of Valo Tokens app)

You may also compare API permissions of Valo tokens app for the tenant which has authentication problems with the app which is installed on tenant where everything is working.

Troubleshoot Azure functions

Open developer console, switch to Network tab and reload the page. If there are red requests to Azure functions (400 Bad request or 500 Internal server error) you may check what happens inside failing Azure function using the following steps:

  1. Navigate to Azure portal > TW Functions app > Functions > click function which fails
  2. Click Code + Test > Logs (below the page) > Expand. Don't close this tab
  3. Open TW in the new browser tab and reload the page
  4. After page load will be completed switch back to the tab with AF log and check the log there. It should contain log of what happens inside AF

If logs are missing or there is one of the following errors in the log:

  • Function started and then immediately "Function completed (Failure, Id =...)"
  • The type initializer for TeamworkAzureFunctions.* threw exception

please check that BindingRedirects app setting is specified in Configuration > App settings. It is also good idea to check that all following app settings exist in Configuration > App settings of Azure function app (all app settings should not be empty except TeamworkGroupSchemaExtensionName which should be empty):

Function App Settings

Please note that BindingRedirects app setting contains value which may be different in each release. The following table shows BindingRedirects for previous releases:

Troubleshoot Valo Teamwork Installer

Valo Teamwork Installer installation information can be found here:

Troubleshoot Certificate based authentication

How to configure Configure the Certificate based authentication can be found here:

Release BindingRedirects
1.21 [{ "ShortName": "Newtonsoft.Json", "RedirectToVersion": "12.0.0.0", "PublicKeyToken": "30ad4fe6b2a6aeed" }, { "ShortName": "Microsoft.Graph.Core", "RedirectToVersion": "1.18.0.0", "PublicKeyToken": "31bf3856ad364e35" }, { "ShortName": "Microsoft.Graph", "RedirectToVersion": "1.20.0.0", "PublicKeyToken": "31bf3856ad364e35" }]
1.22 [{ "ShortName": "Newtonsoft.Json", "RedirectToVersion": "12.0.0.0", "PublicKeyToken": "30ad4fe6b2a6aeed" }, { "ShortName": "Microsoft.Graph.Core", "RedirectToVersion": "1.20.1.0", "PublicKeyToken": "31bf3856ad364e35" }, { "ShortName": "Microsoft.Graph", "RedirectToVersion": "3.3.0.0", "PublicKeyToken": "31bf3856ad364e35" }]
1.23 [{ "ShortName": "Newtonsoft.Json", "RedirectToVersion": "12.0.0.0", "PublicKeyToken": "30ad4fe6b2a6aeed" }, { "ShortName": "Microsoft.Graph.Core", "RedirectToVersion": "1.21.0.0", "PublicKeyToken": "31bf3856ad364e35" }, { "ShortName": "Microsoft.Graph", "RedirectToVersion": "3.14.0.0", "PublicKeyToken": "31bf3856ad364e35" }]
3.0 [ { "ShortName": "Newtonsoft.Json", "RedirectToVersion": "12.0.0.0", "PublicKeyToken": "30ad4fe6b2a6aeed" }, { "ShortName": "Microsoft.Graph.Core", "RedirectToVersion": "1.23.0.0", "PublicKeyToken": "31bf3856ad364e35" }, { "ShortName": "Microsoft.Graph", "RedirectToVersion": "3.21.0.0", "PublicKeyToken": "31bf3856ad364e35" }]

Troubleshoot web jobs

Currently there are three web jobs in teamwork. They run in background by schedule:

Web job Default schedule Description
TeamworkCreator each 5 minutes Creates sites, groups and teams ordered from TW dashboard
Groups sync each 15 minutes Synchronizes groups from Azure AD to Azure storage
Autoarchiving once per day Archives group or team after configured amount of days

The main tool for troubleshooting web jobs are logs. Before to check logs it is highly recommended to enable debug logging. It can be done from App service > Configuration > App settings - set TeamworkUseDebugLogging property to true and click Save after that:

1
TeamworkUseDebugLogging: true

Also it is good idea to check that all the following app settings exist and have non-empty values:

App settings

Warning

Please note that BindingRedirects app setting contains value which may be different in each release. See table above which contains values of BindingRedirects setting for each release)

So if sites/groups are not created or if TW dashboard is empty - check logs of web jobs. They can be found in Azure portal > TW app service > Web jobs. It is also possible to run web job from there manually without waiting when it will run by schedule.