Built-in Integrations Microsoft in Staging Environment

What I’m trying to do:
Built-in Integrations Microsoft is working in anvil editor with settings:

  • callback_url
  • Link to your own Azure app ( application_id, secret_client, tenant id, scopes)

What I’ve tried and what’s not working:
Built-in Integrations Microsoft is’nt working in Staging Environment with error
Errors :

java.lang.UnsupportedOperationException: Attempted to decrypt an encrypted value ('microsoft-service/application-secret') from the anvil.works hosted platform. This should be specified in the App Server configuration instead.

[ERROR anvil.runtime.server] Error in Microsoft auth callback

I also met the same error and have not found any workaround

Pre-condition:

  1. Use Built-in Integrations Microsoft login
  2. Setup an app on Azure + callback_url to my Anvil public link and Production server
  3. Enable “Link to your own Azure app” on Anvil (application_id, secret_client, tenant id, scopes)

What is happening:

  1. “Login with Microsoft” works normally on Anvil publick link (Dev server)
  2. “Login with Microsoft” fails to work on Production server
    After login with Microsoft account,
    error on Client:
**We could not find an app that matched your request.**
You may have copied the URL for this app incorrectly, or this app may have been deleted or withdrawn. You may also have been logged out, in which case refreshing this page might help.

error on Server:

java.lang.UnsupportedOperationException: Attempted to decrypt an encrypted value ('microsoft-service/application-secret') from the anvil.works hosted platform. This should be specified in the App Server configuration instead.
[ERROR anvil.runtime.server] Error in Microsoft auth callback