I have inherited an Exchange environment and my predecessor left without doing a handover or any documentation. Everything I will provide here, I have had to figure out myself, and there are some gaps.
We have a complicated setup. We are owned by a parent company, and this company has their own tenant. They want to run most O365 services from their tenant. Due to this our Teams accounts are in their tenant. This was the only integration I was aware of between us and their tenant. We have our own tenant, and but we only use it for Azure services. The business wants to start using our tenant for O365 services like Teams, EXO etc.
For reasons unknown to me, our on-prem Exchange was previously connected (via Hybrid) to this other EXO tenant. I will call this tenant “old tenant” going forward. I only became aware of this after I ran the HCW to connect it to our tenant, and this has caused some issues since doing so.
Previously, a user in the old tenant could access our on-prem EXCH mailboxes free busy info. This means the HCW has successfully set up organisation sharing policies between both EXCH orgs. After running the HCW and connecting to our tenant, the users in the old tenant can no longer connect to see free/busy in our on-prem EXCH mailboxes. Here is the strangest part – our Teams accounts (which I mentioned above) can still access our on-prem mailboxes. The reason I mention this is that we can rule out some service being broken; if you read the Teams documentation here, I am going to assume that the pre-reqs must be good as Teams works. This should rule out issues with OAuth and Autodiscover not being available.
I have checked everything I can think of. When I run the RCA tool and select the “test free/busy on-prem” (the one that tests if an EXO user can see free/busy on-prem) we get the following error. This suggests there is an issue with OAuth, I think. But, I can’t find any issue with it. NOTE: the guid (which I have removed) is the GUID assigned to their tenant, not ours, which I assume is expected since the request is coming from them.
Autodiscover failed for email address <ON-PREM email address> with error System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
at Microsoft.Exchange.SoapWebClient.AutoDiscover.DefaultBinding_Autodiscover.EndGetUserSettings(IAsyncResult asyncResult)
at Microsoft.Exchange.InfoWorker.Common.Availability.SoapAutoDiscoverRequest.<>c__DisplayClass48_0.<EndInvoke>b__0()
at Microsoft.Exchange.InfoWorker.Common.Availability.SoapAutoDiscoverRequest.ExecuteAndHandleException(ExecuteAndHandleExceptionDelegate operation) and diagnostics 2000009;reason="The issuer of the token is unknown. Issuer was '00000001-0000-0000-c000-000000000000@<TENANT GUID REMOVED>'.";error_category="invalid_issuer"., inner exception: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
at Microsoft.Exchange.SoapWebClient.AutoDiscover.DefaultBinding_Autodiscover.EndGetUserSettings(IAsyncResult asyncResult)
at Microsoft.Exchange.InfoWorker.Common.Availability.SoapAutoDiscoverRequest.<>c__DisplayClass48_0.<EndInvoke>b__0()
at Microsoft.Exchange.InfoWorker.Common.Availability.SoapAutoDiscoverRequest.ExecuteAndHandleException(ExecuteAndHandleExceptionDelegate operation), diagnostics: 2000009;reason="The issuer of the token is unknown. Issuer was '00000001-0000-0000-c000-000000000000@<TENANT GUID REMOVED>'.";error_category="invalid_issuer"
It seems to me that our EXCH servers do not trust their O365 tenant. But this cannot be true because nothing has changed their side, I can only assume something on our server changed so that it would no longer trust their tenant. Can anyone advise where to start looking to figure this out, and confirm if this errors seems like it could be OAuth? But then again, if it is OAuth, then how can Teams be working since the documentation says OAuth is a pre-req?