Share via

Azure Migrate appliance: web app discovery returns 0 web servers via getfabriclayout, despite Server Discovery successfully reporting AppsAndRoles=True

Ahmed Gamal 0 Reputation points
2026-04-25T11:05:02.9566667+00:00

Setup

  • Azure Migrate appliance, Physical-server mode, Azure Public, public-endpoint connectivity, project in UK South.
  • Appliance is installed on the same VM as the discovery target (loopback / 127.0.0.1), Windows Server 2022 Datacenter, workgroup-joined.
  • Workload on the target: two IIS 10 web sites running ASP.NET Framework 4.8, plus a local SQL Server 2019 Developer instance with one user database.
  • I have followed all the physical-server prerequisites and web-app discovery prerequisites documented by Microsoft, including the workgroup-account WinRM preparation, group memberships, and Local Security Policy rights.

What is working

  • Server is discovered and visible in inventory.
  • SQL Server instance is discovered and visible under Databases.
  • Software inventory and dependency analysis show 100% coverage on the discovered server.
  • Server Discovery service log shows successful guest-discovery cycles, with the workload object reporting AppsAndRoles: True, DependencyMap: True, SQLServerConnectionInfo: True, PendingUpdates: True, and the subsequent updatefabriclayout POST returning HTTP 200.
  • Loopback PowerShell remoting using the same local admin account works end-to-end (verified by running a remote command and getting the hostname back).

What is not working

The portal Web apps tab shows zero entries (no records found). The WebApp discovery service's polling of the getfabriclayout endpoint has been returning a layout containing zero web servers.

The interesting timeline:

  • The agent briefly returned 1 web server in two consecutive polls.
  • After I deleted and re-added the discovery source in the appliance configuration manager (to force a credential remap that I believed was necessary), the next poll dropped back to 0 web servers.
  • It has remained at 0 ever since, even after Server Discovery successfully re-pushed AppsAndRoles: True and updatefabriclayout returned OK.

The Server Discovery agent and the WebApp Discovery agent appear to be two separate agents with two separate REST endpoints (serverrestapi/... and webapprestapi/...), so I assume the cloud service correlates them on the backend. That correlation does not appear to be happening for this server after the discovery-source reset.

What I have already tried

  • Verified IIS roles are installed and sites are visible via PowerShell on the target.
  • Verified the WinRM HTTP path works end-to-end with the same local credential the appliance uses.
  • Followed the documented permission requirements for the credential.
  • Removed and re-added the credential, and the discovery source, in the appliance UI.
  • Restarted each of the appliance discovery services.
  • Cleared the on-disk web-app cache files in the appliance config directory and restarted the WebApp service.
  • Confirmed Server Discovery re-pushed AppsAndRoles: True after each reset.
  • Confirmed the WebApp service polls getfabriclayout successfully (HTTP 200) but still receives a layout with 0 web servers.

Questions

  1. What populates the WebApp getfabriclayout endpoint's list of web servers? Is it driven directly by the Server Discovery agent's AppsAndRoles: True push, or by a separate property on the discovered-server resource that has to be set?
  2. Is there a documented backend-correlation lag between Server Discovery's updatefabriclayout POST and the WebApp agent's getfabriclayout reflecting the change?
  3. Is there any portal-side action or REST API call that forces this correlation to refresh, instead of waiting for the next backend cycle?
  4. Is the regression from 1 to 0 web servers immediately after deleting and re-adding the discovery source documented behavior? If so, what is the supported way to remap credentials on a discovery source without losing the web-app inventory?

I can share appliance log excerpts (with credentials and identifiers redacted) if it helps narrow this down.

Azure Migrate
Azure Migrate

A central hub of Azure cloud migration services and tools to discover, assess, and migrate workloads to the cloud.


2 answers

Sort by: Most helpful
  1. Bharath Y P 8,495 Reputation points Microsoft External Staff Moderator
    2026-04-27T05:51:05.6833333+00:00

    Hello Ahmed, it sounds like you’ve got server discovery happily reporting AppsAndRoles=True, but the WebApp agent’s getfabriclayout call still shows zero IIS servers. Here’s how it all ties together and what you can try:

    1. What feeds the getfabriclayout list? • The Azure Migrate backend only includes machines in getfabriclayout when – Server Discovery sees the IIS role in the software inventory, and – The AppsAndRoles flag is pushed successfully. • In other words, it’s not a separate “magic” property – it’s driven by the combination of:
      1. your software inventory identifying a web-server role
      2. the Server Discovery agent pushing AppsAndRoles=True
      • If either step isn’t fully persisted in the backend database, WebApp discovery won’t show your server.
    2. What about timing/lag? • Web-app discovery is batched on the service side about once every 24 hours by default. • After you enable web-apps in a project or Server Discovery pushes an updatefabriclayout, it can take up to 24 hours for getfabriclayout to start returning results. • In practice you’ll often see it appear within a few minutes, but it’s not instantaneous.
    3. Can you force an immediate refresh? Yes – two options: a) In the Azure portal:
      1. Go to Azure Migrate > your project > Migration Goals > Servers, databases, and web apps
      2. Click the appliance hyperlink under Discovery and assessment
      3. At the bottom of the table, select Refresh services
      b) On the appliance VM:
      1. Open Services
      2. Restart amwebappsvc (the WebApp discovery and assessment service)
      Both will kick off an on-demand WebApp discovery cycle without waiting for the 24h sync.
    4. Why did it drop back to 0 after you re-added the source – and how to avoid it? • Deleting & re-adding the discovery source or credential in the appliance UI effectively clears the web-app cache for that source, so the next sync will start from zero. • Supported way to update credentials without losing your web-app inventory: – In the appliance Configuration Manager, Edit the existing credential (rather than Delete + Add), update the password, and save. – Then trigger an on-demand refresh (portal Refresh services or restart amwebappsvc). This retains the existing server-to-web-app mapping in the backend.

    Additional tips:

    • Check the Notifications under the Azure Migrate: Discovery and assessment tile – it’ll show any web-app discovery errors (40001‒40007, etc.).

    • On the appliance, tail the WebApp agent logs under C:\ProgramData\Microsoft Azure\Logs to see if IIS errors (e.g. 40004 “unable to access IIS config”) are cropping up.

    • Verify the IIS Management Console feature is still installed and your service account still has full access to %windir%\System32\inetsrv\config.

    Hope this helps. and please feel free to reach out if you have any further questions.

    Reference documentation

    Resolve common Azure web app discovery issues

    On-demand web app discovery (portal Refresh services / restart amwebappsvc)

    Common web-apps discovery errors


  2. Q&A Assist
    2026-04-25T11:05:53.2266667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The behavior described (server discovery and software inventory working while web app discovery shows 0 web servers) is not covered in the provided documentation, and the specific internal behavior of getfabriclayout / updatefabriclayout and their correlation is not documented in the context.

    The available guidance for web app discovery issues focuses on standard error codes and prerequisites on the IIS side:

    • IIS Management Console must be enabled and the OS must be Windows Server 2008 R2 or later.
    • The appliance must be able to connect to the server with valid credentials over WS-Management / PowerShell remoting.
    • The credentials must be administrator-level and have access to IIS configuration paths (%windir%\System32\inetsrv and %windir%\System32\inetsrv\config).
    • If discovery fails with generic or uncategorized errors (40005, 40006), logs from the appliance should be collected and a Microsoft support case opened.

    In addition, the documentation notes that:

    • Web apps discovery is performed by a dedicated “Web apps discovery and assessment agent” on the appliance.
    • Software inventory must be enabled before workload discovery (including web apps) is initiated.
    • When issues persist beyond the normal discovery cycles, the recommended path is to open a Microsoft support case, providing appliance logs from C:\ProgramData\Microsoft Azure\Logs.

    Given the context, the questions about:

    1. The exact mechanism that populates the WebApp getfabriclayout list and how it correlates with AppsAndRoles: True.
    2. Any documented backend-correlation lag between updatefabriclayout and getfabriclayout.
    3. Any portal-side or REST operation to force that correlation.
    4. Whether the regression from 1 to 0 web servers after deleting/re-adding the discovery source is documented behavior, and the supported way to remap credentials without losing web-app inventory.

    are not answered in the provided documentation. The only documented next step for persistent or unexplained discovery behavior is to collect logs and raise a Microsoft support case so the backend behavior can be investigated.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.