When backend app services do not have the same custom domain as AFD (Azure Font door), App service session cookies are not passed back to the browser. Therefore session affinity is broken.
There is a workaround that involves pointing the custom domain used in AFD to the app services and register the domain.
- Open app service--> Under Settings --> Custom Domain
- Add Custom Domain --> Enter the custom domain name
- Get the TXT value and create TXT record in your Domain Ex: www.contoso.com Host (asuid.www) Value (Custom Domain Verification ID)
- Once the record is created click on validate to complete the Domain ownership verification.
Hope this was helpful. Please let us know in case of any additional questions or concerns.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well