A call to an OS function failed || Error code 14007: The requested lookup key was not found in any active activation context

Did some testing today, it seems that when onboarding the server to defender 365 the exclusions are not used. After offboarding the problem dissapeared.