Can I create Hub content that is a link to a document on our Sharepoint site?

1547
2
Jump to solution
06-30-2021 04:53 PM
JenniferSherry
New Contributor III

Hi-

We've built an internal Data Portal using the Hub framework.  I'm trying to provide the ability to search our portal for documents as well as all of the spatial data.  We have loads of documents in our Sharepoint site that I'd like to be able to provide to our staff as links when they search our internal portal.  For example, when our staff searches the internal portal for "Prairie Dogs", I'd like them to not only get the spatial data that is titled and/or tagged "Prairie Dogs", but also documents on Sharepoint related to Prairie Dogs.  I've gone ahead and created AGOL items for these documents that are links to PDFs or Word Docs in Sharepoint, and these work just fine.  But when I share the AGOL item with the content group for our internal data portal,  I get this error message (cityofboulder.sharepoint.com refused to connect.)

JenniferSherry_0-1625097106798.png

Any ideas?

Thanks in advance!

Jennifer

0 Kudos
1 Solution

Accepted Solutions
JustinPrather
Esri Contributor

Hi @JenniferSherry. Thanks for leaving a question!

I have two responses:

  1. The first is relevant if you must have your Sharepoint pages appear in an embedded fashion on your Hub site.
  2. The second is relevant if your pages don't need to embed, and if you're ok with those pages opening directly to your Sharepoint site. 

First

In order for the document link to embed in this page, the referenced URL (your Sharepoint site) must be configured to be loaded in other places on the web.

When I try to create a document link to your Sharepoint site, I have the same UI error on my Hub site. Under the hood of the browser, I see this error message: 

 

Access to XMLHttpRequest at 'https://cityofboulder.sharepoint.com/' from origin 'SITE' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

 

It looks like through a change of your Sharepoint site settings, you can get this to work. I think you'd need to work with the person who manages your Sharepoint to allow the URL of your OSMP Hub site using cross origin resource sharing (CORS). This page, which references the specific error, might be a starting point for you.

Second

If you are satisfied with your document link simply redirecting to your Sharepoint site, make the following change in your Hub settings:

Go to edit your site. In the Settings, under Interactions, toggle-off Embedded Links. With this setting off, your document links should open your Sharepoint URLs directly, and not within your Hub site. 

JustinPrather_0-1625152420712.png

 

 

View solution in original post

0 Kudos
2 Replies
JustinPrather
Esri Contributor

Hi @JenniferSherry. Thanks for leaving a question!

I have two responses:

  1. The first is relevant if you must have your Sharepoint pages appear in an embedded fashion on your Hub site.
  2. The second is relevant if your pages don't need to embed, and if you're ok with those pages opening directly to your Sharepoint site. 

First

In order for the document link to embed in this page, the referenced URL (your Sharepoint site) must be configured to be loaded in other places on the web.

When I try to create a document link to your Sharepoint site, I have the same UI error on my Hub site. Under the hood of the browser, I see this error message: 

 

Access to XMLHttpRequest at 'https://cityofboulder.sharepoint.com/' from origin 'SITE' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

 

It looks like through a change of your Sharepoint site settings, you can get this to work. I think you'd need to work with the person who manages your Sharepoint to allow the URL of your OSMP Hub site using cross origin resource sharing (CORS). This page, which references the specific error, might be a starting point for you.

Second

If you are satisfied with your document link simply redirecting to your Sharepoint site, make the following change in your Hub settings:

Go to edit your site. In the Settings, under Interactions, toggle-off Embedded Links. With this setting off, your document links should open your Sharepoint URLs directly, and not within your Hub site. 

JustinPrather_0-1625152420712.png

 

 

0 Kudos
JenniferSherry
New Contributor III

Justin, I was looking for the solution in the second option, so thanks for your quick response!  Changing that setting for "Enbedded Links" did the trick.

Jennifer