Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The host name should not be based on already owned domain #40

Closed
chenxizhang opened this issue Dec 26, 2017 · 15 comments
Closed

The host name should not be based on already owned domain #40

chenxizhang opened this issue Dec 26, 2017 · 15 comments
Assignees

Comments

@chenxizhang
Copy link

The sample code (https://github.com/OfficeDev/office-js-docs-pr/blob/master/docs/develop/create-sso-office-add-ins-aspnet.md) is work correct. thank you

But the add-in should be deploy to production environment, not always localhost,. how to change the App Registration information? when I try to change the api registration info to "api://excelwebaddinsample.azurewebsites.net/f7e0154d-1258-42ef-9e89-9857889f4e01" , i got an error with message "The host name should not be based on already owned domain." and can not save this change.

what can i do ? thank you

@Rick-Kirkham
Copy link
Contributor

I'm researching this.

@chenxizhang
Copy link
Author

is there anything update? @Rick-Kirkham thank you

@Rick-Kirkham
Copy link
Contributor

I'm in a conversation with the product team. Still don't have a definitive answer yet.

@Rick-Kirkham
Copy link
Contributor

I can reproduce your error, but the product team says they cannot. I'm still working with them.

@Rick-Kirkham
Copy link
Contributor

@chenxizhang
The product team believes that you are getting this error because your application is configured to be multitenant. SSO is not supported for multitenant apps. If you turn off support for multitenancy, then you should be able to register "api://excelwebaddinsample.azurewebsites.net/f7e0154d-1258-42ef-9e89-9857889f4e01". Also, they suggested that part of this article https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-devhowto-multi-tenant-overview might be helpful, especially the paragraph that begins "Also note, before an application ..." about verified domains.

@chenxizhang
Copy link
Author

@Rick-Kirkham
thank you for your help

@iliev-ilian
Copy link

iliev-ilian commented Mar 2, 2018

@Rick-Kirkham
I have the same problem registering app in https://apps.dev.microsoft.com. When i register the app with localhost it works, but when add the url to be in azure - it does not work: "The host name should not be based on already owned domain." I am also using SSO.

How could I change the app not to be multitenant? I have found this article https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-devhowto-multi-tenant-overview but in Azure I don't the apps registered in https://apps.dev.microsoft.com. How are they related? Could you give more information regarding this subject.

How I understand it: Apps registered in https://apps.dev.microsoft.com are v2 apps and apps registered in Azure AD are v1 apps. As of your previous response - how do I turn off multitenancy for app in https://apps.dev.microsoft.com?

@chenxizhang Did you find a solution for the problem?

Thank you

@Rick-Kirkham
Copy link
Contributor

@iliev-ilian and @chenxizhang
It looks like this setting is not surfaced in the UI on https://apps.dev.microsoft.com.
Go to the registration page for your add-in's web application.
Scroll down to the botton and click the button to edit the manifest.
Near the bottom of the manifest there is a "tags" property. One subproperty is "availableToOtherTenants". I think (but I'm not sure) that this is the relevant setting. It looks like it defaults to "true", which does no harm when you are working on localhost; but causes the error about "already owned domain" on any other domain.
Please try setting this value to "false" and then save the manifest.
See if that fixes the issue.
PLEASE REPORT BACK HERE THE OUTCOME. If it works, I will add this to the documentation.

@Rick-Kirkham Rick-Kirkham reopened this Mar 2, 2018
@iliev-ilian
Copy link

iliev-ilian commented Mar 6, 2018

@Rick-Kirkham
It still does not work.
I am changing this property in tags to false, saving the manifest - the manifest is saved. And then I change the Application ID URI of the Web API to app in azure, but still get this error.

Do you have any other suggestions?

Edited: Not sure if it is relevant: if I enter a uri, which contains of a random symbols it works (for example: api://gfdsgfdgdfgfdaa.com/{appid}).

@Rick-Kirkham
Copy link
Contributor

I'm trying to get some help from the product team.

@TimMcMSFT
Copy link
Contributor

AzureWebsites.net addresses cannot be used in Azure AD today, since you cannot prove ownership. You will need to host your add-in on a different domain.

@tuandomvn
Copy link

I got the same problem and I resolved by adding a custom domain pointing to your AzureWebiste.

@chenxizhang
Copy link
Author

@Rick-Kirkham @TimMcMSFT
Hi team
I found this issue still there. I've add a custom domain name to my app service site,but it looks not work for me.

1
2

@Rick-Kirkham
Copy link
Contributor

@chenxizhang This seems to be a problem with the AAD registration system, not a problem with the documentation. Please create this issue on the repo office-js.

@chenxizhang
Copy link
Author

Finally I got the solution and resolved this problem。it must use the office 365 tenant administartor to register this app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants