Symptoms
During the registration K2 blackpearl on SharePoint Online I receive this error message: The remote name could not be resolved: 'login.microsoftonline.com'.
URL: https://k2.moneta.cz/Runtime/_trust/spauthorize.aspx?trust=urn:federation:microsoftonlineandampupn=adm-xxxx@monetacz.onmicrosoft.comandampreturnUrl=https://monetacz-93ecda0ae17cee.sharepoint.com/sites/apps/K2forSharePoint/Pages/Application.aspx?sessionGuid=401f5fa0-6859-03ac-8acd-67bbcca552cbandampSPSiteURL=https://monetacz.sharepoint.com/sites/apps
The admin account like this format adm-xxxx@monetacz.onmicrosoft.com has this permission Global Admin for O365 Tenant and has site-collection administrator permission for APP catalog.
The K2 blackpearl server doesn't have access to the internet. If this is the problem we will need specify URL on which he can access.
Could you please help me to solve this issue.
Diagnoses
To enable OAuth over HTTP, run the following commands as a farm administrator account from the SharePoint 2013 Management Shell command prompt on each web server in your SharePoint Server 2013 farm.
$serviceConfig = Get-SPSecurityTokenServiceConfig
$serviceConfig.AllowOAuthOverHttp = $true
$serviceConfig.Update()
Please see the following links however most of them include scripts :
https://technet.microsoft.com/en-us/library/dn197169.aspx
https://samlman.wordpress.com/2015/03/01/setting-up-an-oauth-trust-between-farms-in-sharepoint-2013/
https://technet.microsoft.com/en-us/library/jj649094(v=exchg.150).aspx
Resolution
The issue was resolved by adding configuration proxy to the K2HostServer.exe.config file.