Deleted Federated Gateway

Hi,
I have been having an issue with Exchange 2010 federation that I hope someone can help me with.
I am trying to setup free/busy and calendar sharing with an external organisation.  I had some problems with it and decided to delete everything and start from scratch. I deleted the org relationship OK using EMC, however when removing the
trust I constantly got errors and I couldn't remove it using either the EMC or powershell. 
Eventually I gave up and removed the object in AD configuration,
CN=Federation,CN=xxxxxx,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=xxxxxx,DC=local.  I knew this would cause later problems and it is.
This deleted it from EMC, but but when I run Get-FederatedOrganizationIdentifier I am still seeing this 
RunspaceId          : 87f84e99-8746-4cf1-9a45-d74372569480
AccountNamespace    : FYDIBOHF25SPDLT.domain.co.uk
Domains             :
Enabled             : True
OrganizationContact : [email protected]
DelegationTrustLink : XXXXX.local/Configuration/Deleted Objects/Microsoft Federation Gateway
                      DEL:b54b96c6-8206-4ff1-85ee-994ca25d0573
IsValid             : True
ExchangeVersion     : 0.10 (14.0.100.0)
Name                : Federation
DistinguishedName   : CN=Federation,CN=xxxxxx,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=xxxxxx,DC=local
Identity            : Federation
Guid                : 98450e41-ac8d-4ef4-ae96-d2d8be509f0f
ObjectCategory      : XXXXXX.local/Configuration/Schema/ms-Exch-Fed-OrgId
ObjectClass         : {top, msExchFedOrgId}
WhenChanged         : 07/02/2014 12:43:00
WhenCreated         : 06/07/2011 16:10:43
WhenChangedUTC      : 07/02/2014 12:43:00
WhenCreatedUTC      : 06/07/2011 15:10:43
OrganizationId      :
OriginatingServer   : DC.XXXXX.local
Now, I didn't run this before I added the initial trust so I don't know if this is normal, but it seems wrong to me in that 
a) Sureley there should no data returned, let alone saying enabled=true 
b) the delegationtrustlink points to deleted items container.
c) When I create a new trust I can never seem to add any domains to it.
Thanks in advance

Hi,
Before remove the federation trust, we need to clear up the federation domains. there is the Remove-FederatedDomain –Force switch you can use. Use it to clean up the federated domain, and after that use Remove-FederatedTrust to remove the trust. Next, use
UI to create the trust again. By default the UI will setup the trust with the business gateway.
Thanks,
Winnie Liang
TechNet Community Support

Similar Messages

  • Issue when Creating a Federation Trust with MFG (Microsoft Federation Gateway)

    I am trying to create a Federation Trust with MFG (Microsoft Federation Gateway).  However, I am running into a problem.  I see in the following that link (http://technet.microsoft.com/en-us/library/ff607475(v=exchg.141).aspx)
    that I have to run this command:
    Set-ExchangeServer -Identity "MAIL01" -InternetWebProxy "<Webproxy URL>"
    Please note that I have the following in our Exchange 2010 SP3 environment:
    Two CAS/HT Servers (CAS Array between the two)
    Two mailbox servers (DAG between the two)
    One mailbox server (for stand-alone mailbox/archive databases)
    We use windows load balancing and the internal/external VIP name is "mail.domain.com"
    1. What do I put for the "Web Proxy URL"?
    2. Do I have to run the Set-ExchangeServer -Identity "MAIL01" -InternetWebProxy "<Webproxy URL>" command on every server?

    The link you posted is different than free-busy sharing through the Microsoft Federation Gateway.  All you need to establish Organization Relationships through the Microsoft Federation Gateway is properly published Autodiscover and Exchange Web Services. 
    You can use the Exchange Remote Connectivity Analyzer (http://exrca.com) to validate that.
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • Federation gateway and ISP Change

    Hello...we have a federation gateway connection..through it  we look up free / busy information  between our two branch offices...exchange 2010 on both sides...one branch will be changing ISPs which means new external IP addresses...what affect
    will this have on our connection to our branch office through the gateway and what steps may need to be taken to make sure our Free Busy information with exchange will continue to function.
    Thanking you in advance for your help,

    Hi,
    Creating a text (TXT) record is to provide proof of ownership of the registered Internet domain. Will they change the domain name?
    Thanks,
    Simon Wu
    TechNet Community Support

  • Microsoft Federation Gateway Support??

    Trying to find the correct department / team to contact about having our domain unblock so we can add Microsoft Federation gateway trust with our on premise exchange.
    However Microsoft Customer services and is not even aware of this product and when I ask to speak to their Exchange team I have to pay ??!??!
    http://support.microsoft.com/kb/2615183/en-us

    My understanding is that the answer is to call Microsoft Online Support whether or not you are an Office 365 customer.  If you are correct, an answer might be to create an Office 365 trial tenancy, add and verify your domain, and then call Microsoft
    Online Support.
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • Can't create Federation Trust with Microsoft Federation Gateway

    Hi all,
    I'm trying to create Federation Trust with another Exchange 2010 RU9 Server and on the step "Set-FederatedOrganizationIdentifier" in the Manage Federation Wizard trows the Error:
    Unable to reserve domain "FYDIBMHF36SPPKT.subdomain.mydomain.com" for Application Identifier "000000005G82H793". Detailed information: "An unexpected result was received from Windows Live. Detailed information: "2028 DomainNotReservedinIDS:
    The input namespace was not found".".
    An unexpected result was received from Windows Live. Detailed information: "2028 DomainNotReservedinIDS: The input namespace was not found".
    DomainNotReservedinIDS: The input namespace was not found
    Click here for help... http://technet.microsoft.com/en-US/library/ms.exch.err.default(EXCHG.140).aspx?v=14.3.123.3&t=exchgf1&e=ms.exch.err.Ex703205
    Exchange Management Shell command attempted:
    Set-FederatedOrganizationIdentifier -DelegationFederationTrust 'Microsoft Federation Gateway' -AccountNamespace 'subdomain.mydomain.com' -OrganizationContact '[email protected]' -Enabled $true
    I don't have more then 32 characters in the domain name. 
    Thanks in advance.
    BR

    Hi,
    In addition, please try to create a recipient policy to add that subdomain email addresses to all my users, then create a new trust for that subdomain as the subject of the cert, add that subdomain as the primary domain, and then add the main domain as an
    additional one to the federation trust.
    Thanks
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Allen Wang
    TechNet Community Support

  • How to recover a deleted voice gateway

    Is there a way to recover a deleted voice gateway Cisco Unified Call Manager ver 7.1.5 without having to restore the entire server? This voice gateway was configured on the publisher server.

    Restore last known good configuration from the Restore Wizard.  That worked for me.

  • Microsoft Federation Gateway error provision partner STS

    All,
    I am trying to setup MFG federation trust for Free/Busy with another company.  After I add MFG, I manage the MFG and run through the wizard, but, I get this error:
    An error occurred while attempting to provision Exchange to parner STS.  An error occurred accesssing windows live.  Detailed information:  The underlying connection was closed.  The connection was closed unexpectedly. 
    That is all I get.  From research, I am able to go to this website on echange server...
    https://domains.live.com/service/managedelegation2.asmx
    I already have the external DNS TXT record setup. 
    Autodisocover is completing successfully with warning from MS Connectivity analyzer.
    Any ideas??????

    I'll take a peek on that later,
    BUT
    you need to upgrade to SP3 now.
    http://blogs.technet.com/b/rmilne/archive/2014/04/09/end-of-exchange-2010-sp2-support.aspx
    Cheers,
    Rhoderick
    Microsoft Senior Exchange PFE
    Blog:
    http://blogs.technet.com/rmilne 
    Twitter:   LinkedIn:
      Facebook:
      XING:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Problem removing a Exchange Federation Trust

    Hi, 
    I'm having a problem removing a Federation Trust.  I have removed the Organisation Relationship successfully. However when I go to remove the trust by Powershell  I get the following error
    [PS] C:\Windows\system32>remove-federationtrust "Microsoft Federation Gateway"
    Can't remove federation trust "Microsoft Federation Gateway". It's in use by the following organization(s): CN=Federation,CN=XXXXXX,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=XXXXX,DC=local
        + CategoryInfo          : InvalidOperation: (Microsoft Federation Gateway:ADObjectId) [Remove-FederationTrust], Or
       gsStillUsingThisTrustException
        + FullyQualifiedErrorId : A17E4A11,Microsoft.Exchange.Management.SystemConfigurationTasks.RemoveFederationTrusts
    I cant seem to make other changes to it either, I cant add a domain, remove domain.  I have seen references to delete the object in the Schema but dont really want to do that unless I know it wont cause other problems as I need to recreate this.
    Ian

    There are few things you need to make sure before you remove the federation, like permissions, TXT records etc.
    http://technet.microsoft.com/en-us/library/jj657500(v=exchg.150).aspx
    http://technet.microsoft.com/en-us/library/dd297972(v=exchg.141).aspx
    http://www.c7solutions.com/2012/03/fix-federation-trust-issues-after-html
    Cheers,
    Gulab Prasad
    Technology Consultant
    Blog:
    http://www.exchangeranger.com    Twitter:
      LinkedIn:
       Check out CodeTwo’s tools for Exchange admins
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Gateway server not able to authenticate

    Hello SCOMMers :)
    I have a issue with my SCOM 2012 R2 system that i just can't get my head around.
    We just purchased a brand new SCOM server that I have migrated our environment to, moved the databases, reporting server and finally i got things up and running after some issues with the DB move.
    So i now have 2 SCOM management servers in my environment and four gateway servers, the gateway servers are communicating to the old SCOM server and i want to move them over to the new SCOM server. 
    I ran the powershell commands from this technet article and thought everything was under
    control. But none of the GW servers started communicating with the new SCOM server. 
    I have of course checked the certificates, hosts file, DNS and firewalls, and i reran the MOMCertImport.exe utility. Also checked that the certificate serial number was correctly inserted to the registry after the MOMCertImport.exe was run. (HKLM\Software\Microsoft\Microsoft
    OperationsManager\3.0\Machine Settings, binary value named ChannelCertificateSerialNumber contains the serial number of the certificate in a reverse order)
    Still i was unable to get the GW server to communicate to the correct management server so i decided i to reinstall the GW server so I could set the name of the new SCOM management server during the GW setup. Before i did the reinstall i ran the Microsoft.EnterpriseManagement.GatewayApprovalTool.exe
    with the /Delete parameter, the command ran successfully.
    When i do the install i still cannot get the communication up and running, the GW server gives me the following errors in the eventlog.
    The GW server appears in my Management Servers list but stays in the Not monitored state.
    Event ID: 20057
    Failed to initialize security context for target MSOMHSvc/<ServerFQDN> The error returned is 0x80090303(The specified target is unknown or unreachable). This error can apply to either the Kerberos or the SChannel package.
    Event ID: 20071
    The OpsMgr Connector connected to tmg-app92.mg.local, but the connection was closed immediately without authentication taking place. The most likely cause of this error is a failure to authenticate either this agent or the server . Check the event log on the server and on the agent for events which indicate a failure to authenticate.
    Event ID: 21001
    The OpsMgr Connector could not connect to MSOMHSvc/<ServerFQDN> because mutual authentication failed. Verify the SPN is properly registered on the server and that, if the server is in a separate domain, there is a full-trust relationship between the two domains.
    Event ID: 21016
    OpsMgr was unable to set up a communications channel to <ServerFQDN> and there are no failover hosts. Communication will resume when <ServerFQDN> is available and communication from this computer is allowed.
    I have installed new certificated on both GW and management server, and i did the SCOM GW installation multiple times, but the issue is the same and the eventlog error also are the same.
    Does anyone have any clue to what might be wrong?
    Thanks!
    Bjørn

    Hi,
    After you deleting the gateway with Microsoft.EnterpriseManagement.GatewayApprovalTool.exe, the gateway object is only marked as deleted in databases. Therefore, try to use different name for the new installed gateway, so the old parameters will not
    be associated with the new gateway.
    For the communication\certificates problems check these links:
    http://blog.coretech.dk/msk/common-issues-when-working-with-certificates-in-opsmgr/
    http://www.assemblein.info/system-center/steps-to-resolve-scom-2012-gateway-server-error-unmonitored-state/
    http://www.eventid.net/display-eventid-21016-source-OpsMgr%20Connector-eventno-8983-phase-1.htm
    Natalya

  • BPM Parallel Process with Exclusive Gateway

    Hi,
    I am facing issue with Exclusive Gateway in Parallel Process.
    Issu is, process always in In-Progress state at parallel Join. I mean process stops at Parallel Join and more over there are no errors in the process. If I delete Exclusive Gateway in Parallel process, the process is going to next level human task through Parallel Join. It means working fine.
    I have designed my process in such a way that, 1st task is Human Task ---> then Parallel Split with 2 Human tasks, out of one task performing throught Excusive Gateway and another one is just simple approval. Finally I am merging these two Human tasks using Parallel Join then finally triggerting Approval Human task, and closing the Process.
    Appreciate your quick suggestions to fix this issue.
    Thanks in advance,
    Dev...

    Hi Unni,
    Thanks for your reply.
    I have checked all the parallel tasks and all are in completed state. No errors.
    If I delete Exclusive Gateway it is working fine. I have checked step by step tasks in NWA, and every thing goes well.
    Please let me know If I missout anything.
    Thanks in advance,
    Dev

  • Set up Exchange Hybrid - Unable to access the Federation Metadata document from the federation partner

    Hi,..
    I am configuring Exchange Hybrid deployment with Office 365. On step Set up Exchange Hybrid wizard, I get an error message as bellow :
    Need help please :)
    Thanks,
    IH

    Hi,
    Please make sure a federation trust is established. Creating a federation trust is one of several steps in setting up federated delegation in your Exchange organization.
    And please use the MetadataURL parameter to specify the URL where WS-FederationMetadata is published by the Microsoft Federation Gateway to check result.
    Besides, here is a related thread for your reference.
    http://social.technet.microsoft.com/Forums/exchange/en-US/70baa989-87c2-4d3e-990a-0ff37a05c746/newfederationtrust-not-connecting
    Hope this is helpful for you.
    Best regards,
    Belinda Ma
    TechNet Community Support

  • Unable to delete network

    I'm trying to delete a virtual network, but I'm not allowed to because the portal says it is in use. It is not in use, and I have tried everything I can think of to delete it. The network was created using the preview portal. Mabye there is a bug there
    preventing deletion?
    Hallis

    Greetings, Hallis!
    Please check if there are any VMs associated with that vNet. If yes, please delete them retrieving the disks from them. Reference:
    https://msdn.microsoft.com/library/azure/dn195495.aspx
    Check if the gateway is also removed from vNet.
    Delete the gateway: Remove-AzureVnetGateway -VNetName "xyz"
    Ensure the Point-to-Site VPN connection checkbox is unchecked (if enabled) as this will prevent the VNET from being deleted. Click Save Changes.
    Thank you,
    Arvind

  • Exchange 2010 to Office 365 federation trust

    I'm trying to setup a federated trust between two companies on different domains (Exchange 2010 SP2 on premise/Office 365).  We are trying to share calendar information and contacts.  I've gone through the steps to setup a federated trust and created
    the TXT file for the (Exchange 2010) on premise domain.  When I try creating the trust from the Exchange 2010 on premise domain to Office 365 I receive an error.
    COMMAND: 
    Set-FederatedOrganizationIdentifier –AccountNamespace <some_domain> –DelegationFederationTrust “Microsoft Federation Gateway”
    ERROR:
    Proof of domain ownership has failed. Make sure that the TXT record for the specified domain is available in DNS. The format of the TXT record should be "example.com IN TXT hash-value" where "example.com" is the domain you want to configure
    for Federation and "hash-value" is the proof value generated with "Get-FederatedDomainProof -DomainName example.com".
    Do I need to create a TXT file for the Office 365 side?
    Thanks
    Stephen

    You need to add this TXT record for your domain and publish it EXTERNALLY, so that the MFG can verify it. For example, check the TXT records for Microsoft.com:
    PS C:\> Resolve-DnsName -Type TXT microsoft.com
    Name Type TTL Section Strings
    microsoft.com TXT 2346 Answer {FbUF6DbkE+Aw1/wi9xgDi8KVrIIZus5v8L6tbIQZ
    kGrQ/rVQKJi8CjQbBtWtE64ey4NJJwj5J65PIggVY
    NabdQ==}

  • MGCP Gateway Change port from POTS to Loop Start

    I have an existing MGCP gateway port that I need to change from POTS to Loop start, however I have not seen a setting in UCM that allows me to do this. When I try to delete the port, it ask if I want to delete this gateway and I'm scared that it will blow all my ports away. Does anyone know how to reset this port to the default so I can program loop start or updat the existing port?

    Yeah you need to delete the port from the gateway and re-add it to change it.  You will need to remove route pattern/route group dependencies in order to delete the port.  I recommend you use the Dependency Records to find out what RGs this port is assigned to so that you can add it back in.
    If these are FXS ports, I'd actually recommend you keep it at POTS until CM 8.5, though, since LS is the default configuration for the port in IOS, and there is this bug on CM, which isn't fixed until 8.5:
    CSCtf22348
    MGCP FXS GroundStart and LoopStart need Prefix DN; remove Attendant DN

  • Exchange 2013 Untrusted Cross-Forest Availability Intermittently Working

    Goal:
    I’m attempting to configure cross-forest availability for Exchange 2013 using the instructions here:
    http://technet.microsoft.com/en-us/library/bb125182%28v=exchg.150%29.aspx
    At the very bottom of the page are three different methods.  I have tried the first (per-user) and the third (untrusted) methods, with identical results.  For various unfortunate reasons, I am unable to use the Microsoft Federated Gateway for availability
    information (although that is configured in the production domain and I would use it if it were possible). 
    Situation:
    When attempting to view availability information in either OWA or Outlook, the free/busy information typically isn’t visible.  If you open and close Outlook a few times, creating meetings with the users in other domains, sometimes the other user’s information
    will be visible, and sometimes it will not.  When it is not, the area is filled with diagonal lines and hovering over it says “No Information”.  The situation is the same in both Adatum trying to access Contoso, and in Contoso trying to access either
    Adatum or Fabrikam.
    I’m currently close to finishing up my third week with Microsoft Support on this issue, and am starting over with a third first level support person.  They are quickly eroding what little confidence I had in them already.  I’m posting here because
    I’m desperate, and web searches for my errors turn up zero results.  I fear this method of availability sharing doesn’t actually work correctly in Exchange 2013 as Microsoft is pushing organizations to use the Microsoft Federated Gateway, but I’d love
    to heave about anyone getting this to work, or not.
    Setup:
    There are three separate domains I am working with (names changed to protect the innocent).  Contoso.local is the production domain, containing Exchange 2007 and Exchange 2013 SP1 servers.  Adatum.local is a test domain set up fresh with Exchange
    2013 SP1.  Fabrikam.com is a remote Exchange system that I others are connecting to without issue using Exchange 2010.
    The Contoso and Adatum domain controllers are running Windows Server 2008 R2 SP1 and are running at a 2008 R2 functional levels.  The Exchange 2013 servers are all at SP1 (results were the same prior to SP1), and the OS is Windows Server 2012. 
    Contoso has two sites, connected via 10Gbps links, and ~10ms latency, with Exchange 2013 CAS and mailbox servers in both sites.  Adatum has a single site, and has two CAS and two mailbox servers.  Fabrikam has one internet facing server to connect
    to.  A handful of contacts have been created in both Contoso and Adatum for the other domains, to select to view availability.
    Contoso and Adatum domains sit on different subnets, but there is no firewall or filtering between their subnets.  Routing between them is completely unimpeded.  The Fabrikam server sits on another network across the internet, but firewalls have
    been configured and I can browse the availability website from the Contoso CAS servers.
    The CAS servers were originally set up to be load balanced, but working with Microsoft they’ve had me specify a single CAS server for autodiscover/EWS/ECP/OWA/etc in both Contoso and Adatum.  The number of actual users on Exchange 2013 in Contoso is
    ~10.  In Adatum, there are only a handful of mailboxes configured.  The Exchange 2007 servers in Contoso are using Public Folders for free/busy replication for other domains right now, and we don’t care at the moment if they can use the 2013 availability. 
    None of our testing/configurations have involved the Exchange 2007 servers.  There are no SPNs configured for the other domains in AD.
    Errors:
    There are three basic errors that are returned in Outlook diagnostics.  The first is the timeout error.  For a given mailbox server, the first time it is queried for availability information for a remote domain (after some amount of time of being
    idle) it might not respond for 70 seconds (actually somewhere between 69 and 70 seconds each time when viewing the IIS logs), and eventually fails with the timeout error.  If it doesn’t timeout, then it will respond with the Correct Response.
    Once a particular mailbox server has timed out, it will typically immediately return the first Availability Error for all subsequent calls.  Less frequently, it will return Availability Error 2.  If a mailbox server returns the first Availability
    Error, then it will continue to return that error until it times out again or starts working.  Similarly, if a mailbox server returns the second Availability Error, then it will continue to return that error until it times out again or starts working.
    If an IISRESET is performed on a mailbox server, then it will either timeout at the next cross-forest availability request, or work.  There is never an issue accessing availability information for users in the same domain as the request.
    If the remote Exchange is in an errored state, then the response includes the error.  For example, if the mailbox servers in the remote domain are turned off, and the local mailbox server that you are querying happens to be responding correctly
    for the remote domain, then it will return an error about how no mailbox servers are available in adatum.local to service the request.
    There are no Event Log errors that correspond to failed requests of any type.  IIS logs don’t show anything beyond what is shown in the Outlook diagnostics.  There are no DNS or Active Directory Replication errors in the Event Logs.
    Timeout error:
    CalendarEvents       : {}
    ViewType             : None
    MergedFreeBusyStatus : {}
    WorkingHours         :
    Result               : Error
    ErrorCode            : ErrorTimeoutExpired
    ErrorMessage         : Microsoft.Exchange.InfoWorker.Common.Availability.TimeoutExpiredException: Request could not be processed in time. Timeout occurred during 'LookupRecipientsBatchBegin'.
                           . Name of the server where exception originated: Mailbox01
    ErrorDetails         : {}
    ErrorProperties      : {}
    Availability Error:
    CalendarEvents       : {}
    ViewType             : None
    MergedFreeBusyStatus : {}
    WorkingHours         :
    Result               : Error
    ErrorCode            : ErrorProxyRequestProcessingFailed
    ErrorMessage         : Unable to send cross-forest request for mailbox <Free BusyTest>SMTP:[email protected] because of invalid configuration., inner exception: Microsoft.Exchange.InfoWorker.Common.Availability.AutoDiscoverFailedException:
    AvailabilityAddressSpace 'adatum.local' couldn't be used because the Autodiscover endpoint couldn't be discovered.
                           . Name of the server where exception originated: Mailbox01
    ErrorDetails         : {}
    ErrorProperties      : {}
    Availability Error 2:
    CalendarEvents       : {}
    ViewType             : None
    MergedFreeBusyStatus : {}
    WorkingHours         :
    Result               : Error
    ErrorCode            : ErrorProxyRequestProcessingFailed
    ErrorMessage         : Unable to send cross-forest request for mailbox <Free BusyTest>SMTP:[email protected] because of invalid configuration., inner exception: Microsoft.Exchange.InfoWorker.Common.Availability.AddressSpaceNotFoundException:
    Configuration information for forest/domain swelab.wayad.corp.wayport.net could not be found in Active Directory.
                              at Microsoft.Exchange.InfoWorker.Common.Availability.TargetForestConfigurationCache.FindByDomain(OrganizationId
    organizationId, String domainName)
                              at Microsoft.Exchange.InfoWorker.Common.Availability.QueryGenerator.GetTargetForestConfiguration(EmailAddress
    emailAddress)
                           . Name of the server where exception originated: Mailbox02
    ErrorDetails         : {}
    ErrorProperties      : {}
    Working:
    CalendarEvents       : {Microsoft.Exchange.WebServices.Data.CalendarEvent}
    ViewType             : FreeBusyMerged
    MergedFreeBusyStatus : {Free, Free, Free, Free...}
    WorkingHours         : Microsoft.Exchange.WebServices.Data.WorkingHours
    Result               : Success
    ErrorCode            : NoError
    ErrorMessage         :
    ErrorDetails         : {}
    ErrorProperties      : {}
    Start : 04/09/2014 00:00:00
    End : 04/12/2014 00:00:00
    Subject :
    Location :
    Testing Methodologies:
    While it is possible to dig through Outlook diagnostics and OWA, we ended up scripting out these requests to save time.  Microsoft support refuses to use the scripts, but they produce the same output that it takes them days to find in the logs, so I’ll
    post them here to help anyone in the future.
    Through reading the documentation and experimenting, it appears that the Exchange 2013 CAS servers really do just proxy availability requests from the client to the mailbox servers.  At least by default, it seems to pick a mailbox server in the same
    site, but which mailbox server in the site appears to be random.  It will typically pick the same one repeatedly for a while.
    The first script uses the Microsoft Exchange Web Services Managed API 2.1.
    http://www.microsoft.com/en-us/download/details.aspx?id=42022
    You specify a source email address, and a target address in the remote domain, and it creates a SOAP request that it sends to a CAS server of the source email address.  The CAS proxies the request to the mailbox server which either responds with a failure
    or the free/busy data.
    The second script takes the XML SOAP request generated by the first script, and uses that to query a mailbox server directly.  That allows you to test specific mailbox servers that are working or failing, instead of randomly using whichever mailbox
    server the CAS happens to select.  I generated a SOAP request with the first script that I knew had some data, and then copy/pasted it into the second script to verify if data was being returned.
    I’ve deleted and recreated the availability address spaces in Contoso and Adatum for each other and Fabrikam multiple times.  I’ve reset the password in the OrgWideAccount in both Adatum and Contoso, and viewed the lastBadPassword attribute in both
    ADs to verify it wasn’t failing authentication.  (A failed authentication also generates a 401 error that is returned to the client.)  I can access the availability site of the other domain using the credentials of the OrgWideAccount without any
    errors ever.
    First Script:
    # Import the Exchange Web Services module
    Import-Module -Name "C:\Program Files (x86)\Microsoft\Exchange\Web Services\2.1\Microsoft.Exchange.WebServices.dll"
    # Create the services object used to connect to Exchange
    # You can specify a specific Exchange version, which I had to do to connect to 2007
    # Exchange2007_SP1
    # Exchange2010
    # Exchange2010_SP1
    # Exchange2010_SP2
    # Exchange2013
    # $ExchangeVersion = [Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2007_SP1
    # $Service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService($ExchangeVersion)
    $Service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService
    $Service.UseDefaultCredentials = $true
    # Specify an SMTP address. The autodiscover URL from the associated mailbox will be used to connect to Exchange
    # This is used to distinguish resolving from the 2007 server versus 2013
    #$Service.AutodiscoverUrl("[email protected]") # For Exchange 2007
    $Service.AutodiscoverUrl("[email protected]") # For Exchange 2013
    # Increase the amount output at the end to include the SOAP commands
    $Service.TraceEnabled = $true
    # Specify time frame to get free/busy for
    $StartTime = [DateTime]::Parse([DateTime]::Now.ToString("yyyy-MM-dd 0:00"))
    $EndTime = $StartTime.AddDays(7)
    # Create the various objects needed to perform the EWS request
    $drDuration = new-object Microsoft.Exchange.WebServices.Data.TimeWindow($StartTime,$EndTime)
    $AvailabilityOptions = new-object Microsoft.Exchange.WebServices.Data.AvailabilityOptions
    $AvailabilityOptions.RequestedFreeBusyView = [Microsoft.Exchange.WebServices.Data.FreeBusyViewType]::DetailedMerged
    $Attendeesbatch = New-Object "System.Collections.Generic.List[Microsoft.Exchange.WebServices.Data.AttendeeInfo]"
    $attendee = New-Object Microsoft.Exchange.WebServices.Data.AttendeeInfo($userSMTPAddress)
    # Specify SMTP addresses of accounts to request availability for
    #$Attendeesbatch.Add("[email protected]")
    $Attendeesbatch.Add("[email protected]")
    #$Attendeesbatch.Add("[email protected]")
    #$Attendeesbatch.Add("[email protected]")
    # Clear out old results so that a failed request doesn't show information still
    $availresponse = ""
    # Request the availability information from Exchange
    $availresponse = $service.GetUserAvailability($Attendeesbatch,$drDuration,[Microsoft.Exchange.WebServices.Data.AvailabilityData]::FreeBusy,$AvailabilityOptions)
    # Show summary information that would include errors
    $availresponse.AttendeesAvailability
    # Show all of the appointments in the requested time period
    foreach($avail in $availresponse.AttendeesAvailability){
    foreach($cvtEnt in $avail.CalendarEvents){
    "Start : " + $cvtEnt.StartTime
    "End : " + $cvtEnt.EndTime
    "Subject : " + $cvtEnt.Details.Subject
    "Location : " + $cvtEnt.Details.Location
    Second Script:
    # Change the server in this URL to specify which mailbox server to access
    $url = 'https://mailbox01.contoso.local:444/EWS/Exchange.asmx'
    # Uncomment the below lines if you want to query EWS using credentials other than
    # the ones used to run the script.
    #If(!(Test-Path variable:global:cred))
    # $cred = Get-Credential
    function Execute-SOAPRequest
    [Xml] $SOAPRequest,
    [String] $URL
    write-host "Sending SOAP Request To Server: $URL"
    $soapWebRequest = [System.Net.WebRequest]::Create($URL)
    # These appear to be the only things needed in the headers when making the request
    $soapWebRequest.ContentType = 'text/xml;charset="utf-8"'
    $soapWebRequest.Accept = "text/xml"
    $soapWebRequest.Method = "POST"
    If(Test-Path variable:global:cred)
    $soapWebRequest.Credentials = $cred
    Else
    $soapWebRequest.UseDefaultCredentials = $true
    write-host "Initiating Send."
    $requestStream = $soapWebRequest.GetRequestStream()
    $SOAPRequest.Save($requestStream)
    $requestStream.Close()
    write-host "Send Complete, Waiting For Response."
    $resp = $soapWebRequest.GetResponse()
    $responseStream = $resp.GetResponseStream()
    $soapReader = [System.IO.StreamReader]($responseStream)
    $ReturnXml = [Xml] $soapReader.ReadToEnd()
    $responseStream.Close()
    write-host "Response Received."
    return $ReturnXml
    # The specing and line returns in the below variable are important for some reason
    # For example, there must be a line return after the @' on the first line, or it's invalid...
    # Change the line with this:
    # <t:Address>[email protected]</t:Address>
    # to the email address in the domain you want to query
    $soap = [xml]@'
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
    <t:RequestServerVersion Version="Exchange2013_SP1" />
    <t:TimeZoneContext>
    <t:TimeZoneDefinition Name="(UTC-06:00) Central Time (US &amp; Canada)" Id="Central Standard Time">
    <t:Periods>
    <t:Period Bias="P0DT6H0M0.0S" Name="Standard" Id="Std" />
    <t:Period Bias="P0DT5H0M0.0S" Name="Daylight" Id="Dlt/1" />
    <t:Period Bias="P0DT5H0M0.0S" Name="Daylight" Id="Dlt/2007" />
    </t:Periods>
    <t:TransitionsGroups>
    <t:TransitionsGroup Id="0">
    <t:RecurringDayTransition>
    <t:To Kind="Period">Dlt/1</t:To>
    <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
    <t:Month>4</t:Month>
    <t:DayOfWeek>Sunday</t:DayOfWeek>
    <t:Occurrence>1</t:Occurrence>
    </t:RecurringDayTransition>
    <t:RecurringDayTransition>
    <t:To Kind="Period">Std</t:To>
    <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
    <t:Month>10</t:Month>
    <t:DayOfWeek>Sunday</t:DayOfWeek>
    <t:Occurrence>-1</t:Occurrence>
    </t:RecurringDayTransition>
    </t:TransitionsGroup>
    <t:TransitionsGroup Id="1">
    <t:RecurringDayTransition>
    <t:To Kind="Period">Dlt/2007</t:To>
    <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
    <t:Month>3</t:Month>
    <t:DayOfWeek>Sunday</t:DayOfWeek>
    <t:Occurrence>2</t:Occurrence>
    </t:RecurringDayTransition>
    <t:RecurringDayTransition>
    <t:To Kind="Period">Std</t:To>
    <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
    <t:Month>11</t:Month>
    <t:DayOfWeek>Sunday</t:DayOfWeek>
    <t:Occurrence>1</t:Occurrence>
    </t:RecurringDayTransition>
    </t:TransitionsGroup>
    </t:TransitionsGroups>
    <t:Transitions>
    <t:Transition>
    <t:To Kind="Group">0</t:To>
    </t:Transition>
    <t:AbsoluteDateTransition>
    <t:To Kind="Group">1</t:To>
    <t:DateTime>2007-01-01T06:00:00.000Z</t:DateTime>
    </t:AbsoluteDateTransition>
    </t:Transitions>
    </t:TimeZoneDefinition>
    </t:TimeZoneContext>
    </soap:Header>
    <soap:Body>
    <m:GetUserAvailabilityRequest>
    <m:MailboxDataArray>
    <t:MailboxData>
    <t:Email>
    <t:Address>[email protected]</t:Address>
    </t:Email>
    <t:AttendeeType>Required</t:AttendeeType>
    <t:ExcludeConflicts>false</t:ExcludeConflicts>
    </t:MailboxData>
    </m:MailboxDataArray>
    <t:FreeBusyViewOptions>
    <t:TimeWindow>
    <t:StartTime>2014-04-03T00:00:00</t:StartTime>
    <t:EndTime>2014-04-10T00:00:00</t:EndTime>
    </t:TimeWindow>
    <t:MergedFreeBusyIntervalInMinutes>30</t:MergedFreeBusyIntervalInMinutes>
    <t:RequestedView>DetailedMerged</t:RequestedView>
    </t:FreeBusyViewOptions>
    </m:GetUserAvailabilityRequest>
    </soap:Body>
    </soap:Envelope>
    $ret = Execute-SOAPRequest $soap $url
    # Uncomment out one of the below two lines to get output in different alternative formats
    #$ret | Export-Clixml c:\temp\1.xml;Get-Content c:\temp\1.xml
    #$ret.InnerXml
    # If the request is successful, show the appointments, otherwise show the failure message
    If ($ret.Envelope.Body.GetUserAvailabilityResponse.FreeBusyResponseArray.FreeBusyResponse.ResponseMessage.ResponseClass -eq 'Success')
    $ret.Envelope.Body.GetUserAvailabilityResponse.FreeBusyResponseArray.FreeBusyResponse.FreeBusyView.CalendarEventArray.CalendarEvent
    Else
    $ret.Envelope.Body.GetUserAvailabilityResponse.FreeBusyResponseArray.FreeBusyResponse.ResponseMessage

    In this case, the SMTP domain is the same as the AD domain.  If the wrong domain were configured then the connection would never work, as opposed to sometimes work.
    RunspaceId            : abb30c12-c578-4770-987f-41fe6206a463
    ForestName            : adatum.local
    UserName              : adatum\availtest
    UseServiceAccount     : False
    AccessMethod          : OrgWideFB
    ProxyUrl              :
    TargetAutodiscoverEpr :
    ParentPathId          : CN=Availability Configuration
    AdminDisplayName      :
    ExchangeVersion       : 0.1 (8.0.535.0)
    Name                  : adatum.local
    DistinguishedName     : CN=adatum.local,CN=Availability Configuration,CN=Wayport,CN=Microsoft
                            Exchange,CN=Services,CN=Configuration,DC=contoso,DC=local
    Identity              : adatum.local
    Guid                  : 3e0ebc2c-0ebc-4be8-83d2-077746180d66
    ObjectCategory        : contoso.local/Configuration/Schema/ms-Exch-Availability-Address-Space
    ObjectClass           : {top, msExchAvailabilityAddressSpace}
    WhenChanged           : 4/15/2014 12:33:53 PM
    WhenCreated           : 4/15/2014 12:33:35 PM
    WhenChangedUTC        : 4/15/2014 5:33:53 PM
    WhenCreatedUTC        : 4/15/2014 5:33:35 PM
    OrganizationId        :
    OriginatingServer     : dc01.contoso.local
    IsValid               : True
    ObjectState           : Unchanged

Maybe you are looking for

  • Getting values from a table without any type

    Hi, I am having problem accessing the values of a table which does not have a type. When we go and check the type of the table, it is not mentioned. While debugging we found that the type of this particular table is deep structure. I tried using ASSI

  • Managing Multiple Aperture Libraries

    I use multiple Aperture libraries with Aperture 3. When I start-up Aperture, I get a list of libraries that I've used in the past. However, some of the libraries are now deleted but still show up on that list. Is there any way to edit the list of lib

  • ITunes 9: Can I have different views for different libraries?

    In iTunes 8 I was able to have different views for viewing different libraries. For example, I had my music library in Grid view and my podcast library in list view. When I change between the two libraries in iTunes 9 the view does not automatically

  • Changed IP, but Forum Mod banned me AGAIN, how?

    I posted here before about changing my IP. Basically, I had a disagreement with a mod on a forum. He banned me because of it. Since I was IP banned, I changed my IP address. (the one people can see). Sure enough, today, I see that I was banned (from

  • Black font with white contour?

    I have a "cloudy" background, changing from light to dark. Best font option would be a black font with white contour. I know how to get the font into "contour" but, how can I cange the filling of the contour? Thanx for helping!