Hi there, I am developing a web trigger forge application that will (hopefully) send data to a Microsoft Sharepoint instance. I am in the midst of trying to register my application with a Sharepoint instance and it asks me for the following :
Add-in Domain . The host name of the remote component of the SharePoint Add-in. If the remote application isn’t using port 443, the add-in domain must also include the port number. The add-in domain must match the URL bindings you use for your web application. Do not include protocol (“https:”) or “/” characters in this value. If your web application host is using a DNS CNAME alias, use the alias. Some examples:
@HeyJoe is there an alternative way to discover the hostname your application is running on besides using the web trigger trick you mentioned above? I noticed we do seem to find it in the invocation context (as siteUrl) when called from custom UI but there are times we want it when we’ve been invoked in another manner (ie issue events, async events, or scheduled events).
Most of these events do include the installContext though which I have found can be mapped to hostname via the graphql api but I haven’t used that much and don’t how appropriate it is for this or if there is a better way.
Regarding use of the graphql api to fetch the hostname I did this and it actually seems to work ok. So I think I can use this for most of our events where we just extract the cloudId from context.installContext and pass it to this function.