Symptoms
This occurs on the configuration wizard when entering a required URL it will then redirect you to the office 365 portal.
Diagnoses
When having installed the K2 app for sharepoint on a sharepoint online instance, when trying to run the registration wizard using a url, when the next button is clicked this then sends you back to the office365 login page saying that the user is logged in, if you then go back to the K2 registration wizard the host name shows as the internal host name
Resolution
To resolve this issue you will need to make sure that the user performing this is tenant admin.
Also be sure to check the following:
Make sure the binding upon IIS under the smartforms runtime url has been added.
Within the manage realms section on K2 designer under the system category, Make sure the desired URL here for designer, runtime and the viewflow has been added.
When making any changes please do a service restart and an IIS reset also.
After this was done the client has stated that this is now working as it should be.