Migration of Function App From In Process to Isolated Model

Anand Muthusamy 0 Reputation points
2026-07-15T06:51:24.38+00:00

Hi All,

  • I am currently migrating my function App from In Process to Isolated Model.
  • During testing I encountered some exceptions.
  • I need help on how to proceed and resolve this exception. Below is the exception
  • Exception: MSAL.NetCore.4.79.0.0.MsalClaimsChallengeException: ErrorCode: invalid_grant Microsoft.Identity.Client.MsalClaimsChallengeException: AADSTS53003: Access has been blocked by Conditional Access policies. The access policy does not allow token issuance. Trace ID: xxx, Correlation ID: xxx, Timestamp: xxx The returned error contains a claims challenge
    • ResponseBody: {"error":"invalid_grant","error_description":"AADSTS53003: Access has been blocked by Conditional Access policies. The access policy does not allow token issuance. Trace ID: xxx, Correlation ID: xxx , Timestamp: xxx","error_codes":[53003],"timestamp":"xxx","trace_id":"xxx,"correlation_id":"xxx","error_uri":"[https://login.microsoftonline.com/errorHidden Credential]","suberror":"message_only","claims":"{"access_token":{"capolids":{"essential":true,"values":["3d79d567-88b8-4901-ae54-01418818a0e8"]}}}"} 
  • FYI, I am using ClientAssertionCredential and FederatedIdentity
  • I did some troubleshooting and found the below potential reasons
  • In-process (dotnet): The Functions host process loads its own bundled dependencies. Due to assembly binding conflicts, the host's older MSAL (4.60.x) overrides the project's MSAL 4.79.0 at runtime. This older MSAL does NOT trigger CA policy evaluation
  • Isolated (dotnet-isolated): The worker runs in a separate process and loads exactly Azure.Identity 1.17.1 + MSAL 4.79.0 as referenced. This newer MSAL opts into CA policy enforcement, causing Azure AD to evaluate and block the request

Kindly let me know for any possible fixes / resolution for this.

Thanks in Advance

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


2 answers

Sort by: Most helpful
  1. Rukmini 43,900 Reputation points Microsoft External Staff Moderator
    2026-07-16T03:25:28.8333333+00:00

    Hey @Anand Muthusamy Thanks for the detailed report—this exception is coming from Azure AD during token acquisition, and the key part of the error is:

    AADSTS53003: Access has been blocked by Conditional Access policies. The access policy does not allow token issuance.

    So, regardless of the Functions migration mechanics, once the isolated worker starts using the newer MSAL/Auth flow, your conditional access policy is now evaluating the request and blocking it.

    That aligns with your observation:

    • In-process: host loads an older MSAL (4.60.x) due to dependency/assembly resolution, so CA isn’t being enforced in the same way.
    • Isolated: worker loads Azure.Identity 1.17.1 + MSAL 4.79.0, so CA policy enforcement happens, and the token issuance is blocked.

    Based on the provided Azure Functions migration guidance, the migration itself should be done as a coherent “code + config” change (not only a setting flip). In practice, to fix your scenario you’ll need to ensure the isolated worker’s auth behavior is allowed by your Conditional Access policy.

    1. Confirm the migration is complete/correct (staging-slot approach) Microsoft guidance recommends using a staging slot, updating both the runtime setting and stack appropriately, validating, then swapping.
    • Ensure FUNCTIONS_WORKER_RUNTIME is set to dotnet-isolated in the app configuration for the slot you’re testing (and that it’s not marked as a slot setting).
    • Ensure you’ve updated the project packages/references for the isolated model (per the migration guide).
    1. Make Conditional Access allow the isolated worker token request Because the isolated worker causes MSAL to trigger the CA evaluation (while in-process didn’t), the resolution is on the Conditional Access side: the access policy needs to permit token issuance for the authentication pattern used by the isolated worker.

    In the meantime, you can also treat this as a configuration-drift issue to validate:

    • Does the isolated worker use the same identity, app registration, federation/credential configuration, and auth parameters as the in-process version?
    • Does the CA policy include conditions that differ between the two runs (even subtly)—for example, differences in the authentication request characteristics due to MSAL version/claims challenge?
    1. If you want to keep behavior consistent with in-process Your current diagnosis suggests dependency/version differences between host and worker. While this might “work” temporarily, the isolated model is designed to run with the worker’s own dependency set, so the sustainable approach is to align Conditional Access to the isolated auth behavior rather than relying on the in-process host overriding MSAL.

    To make progress quickly (and safely), check in your Azure AD sign-in logs / CA diagnostics for the blocked request from the isolated worker, and compare it to what happens in the in-process case.

    Let me know if any further queries - feel free to reach out!

    Was this answer helpful?


  2. Alex Burlachenko 25,115 Reputation points MVP Volunteer Moderator
    2026-07-15T07:02:08.88+00:00

    hi Anand Muthusamy & thx for sharing urs issue here at Q&A portal,

    the real root cause is the Conditional Access policy, not the migration to the isolated worker model. AADSTS53003 means Entra evaluated policy ID 3d79d567-88b8-4901-ae54-01418818a0e8 and blocked token issuance. The MsalClaimsChallengeException is just how the newer MSAL version surfaces that denial. I wouldn’t rely on the theory that the older in-process MSAL skipped Conditional Access. More likely, the old path simply behaved differently or didn’t expose the claims challenge clearly.

    Check the Entra sign-in logs using the trace/correlation ID and timestamp. That should show exactly which workload identity policy blocked the service principal and why. Review whether the policy requires a condition that a non-interactive workload identity can’t satisfy, such as device compliance or MFA.

    For client credential and federated identity flows, the app can’t complete an interactive claims challenge. The fix is to adjust the Conditional Access policy or exclude this workload identity, not to catch and retry the exception in code.

    https://learn.microsoft.com/entra/identity/conditional-access/workload-identity & https://learn.microsoft.com/entra/workload-id/workload-identity-federation

    So the isolated migration exposed the problem, but it didn’t create it. The CA policy is the actual blocker.

    rgds,

    Alex

    &

    If my answer was helpful pls mark it and additional thx if u follow me at Q&A portal

    and at my blog https://ctrlaltdel.blog/

     

    Was this answer helpful?


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.