Recently many CRM Online customers were transitioned from Live ID to Office 365 authentication.
The result is that the earlier Live ID users accounts no longer exist and any software still using Live ID authentication stopped working.
This requires updating how any portal code authenticates and using a new Office 365 user account to authenticate with.
In addition the CRM 2013 Email Router needs to be reconfigured and updated to the Rollup 2 version ( at this moment in time ).
O365 Authentication
If you start with the latest CRM 2013 SDK example AuthenticateWithNoHelp solution, you can add the code snippet below to the file AuthenticateWithNoHelp.cs to get O365 authentication to work.
First open and compile this solution. Than add the code snippet below to the AuthenticationWithNoHelp class.
The following gives you an IOrganizationService and an IOrganizationServiceContext
If you are incorporating this into an existing CRM 2011 solution, you will need to update your Microsoft.Xrm.Client and Microsoft.Xrm.Sdk references.
The global variables beginning with underscores are used internally in the AuthenticationWithNoHelp class. Substitute your organization name for {orgname}.
public IOrganizationService OrgService { get; set; }
public OrganizationServiceContext OrgContext { get; set; }
private String _discoveryServiceAddress = "https://dev.crm.dynamics.com/XRMServices/2011/Discovery.svc";
private String _userName = "newusername@{orgname}.onmicrosoft.com";
private String _password = "password";
private String _domain = "";
public Authenticate()
{
IServiceManagement<IDiscoveryService> serviceManagement = ServiceConfigurationFactory.CreateManagement<IDiscoveryService>(new Uri(_discoveryServiceAddress));
AuthenticationProviderType endpointType = serviceManagement.AuthenticationType;
IServiceManagement<IOrganizationService> orgServiceManagement = ServiceConfigurationFactory.
CreateManagement<IOrganizationService>( new Uri("https://{orgname}.api.crm.dynamics.com/XrmServices/2011/Organization.svc "));
AuthenticationCredentials credentials = GetCredentials(orgServiceManagement, endpointType);
using (OrganizationServiceProxy organizationProxy =
GetProxy<IOrganizationService, OrganizationServiceProxy>(orgServiceManagement, credentials))
{
OrgService = organizationProxy;
organizationProxy.EnableProxyTypes();
OrgContext = new OrganizationServiceContext(organizationProxy);
}
}
Email Router
Install and reboot.
Then under Configuration Profiles Set the Outgoing Access Credentials to match the Office 365 Credentials used above.
Now
- Publish your changes
- Load Data
- Test Access
That may not cover every Email Router configuration change, but it should cover most of them.