Sending custom email notifications from SharePoint 2019 - sharepoint

My company has both on premise SharePoint 2019 and SharePoint Online. We just found out that we cannot use SPO for our company intranet due to some security limitations in our current tenant (GCC High). I would like to find a solution that allows me to send a web page as an email from SharePoint 2019, similar to the News Feeds in SPO. SharePoint 2019 only sends a link to the page and not the page content. We would like to use this for company announcements and need to have control over how the email is formatted and include images.
Have tried using workflows and alerts. Both came up short when displaying images in emails. I tried setting up a site that allows anonymous access, so the images are accessible. But when I sent the customized email via a workflow, the images where just displayed with a red x. I think an SPFX solution might be better for what I am trying to do.
Does anyone have a link to a site that shows an example of how this might be done? I assume this would be done using spfx, but if anyone knows of a good third-party software that does this, that might work as well.

Related

How can I show a private picture from SharePoint in my Teams Chatbot based on Azure QnAMaker?

I am trying to make a chatbot that will be channeled to Teams using the Azure QnA Maker/ MS botframework. I would like to use pictures in some of my Q&A's that are stored in a SharePoint folder.
As a test I have added a Q&A with the same picture twice: once from private SP and once from the internet.The account I use has access to the said SharePoint and I can add both pictures just fine in the qnamaker.ai portal with the markdown below.(It also works fine in the test mode of the portal itself)
SP\n\n![SP](**link of SP website**/Shared%20Documents/squirrel.jpg)\n\nInternet\n\n![pic1](https://images.unsplash.com/photo-1507666405895-422eee7d517f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80)
My QnA Maker is currently channeled to Teams, and that is where the problem happens; the private picture seems inaccessible. I am accessing Teams from an account that also as access to the SharePoint.
QnAMakerTeamsIssue
How can I make my Teams app read the private SharePoint image?
I'm pretty sure Teams actually caches the images in it's own CDN, so it needs to "pre-fetch" them, so to speak. As a result, it needs to have public anonymous access to the content. This is not possible by default with SharePoint, so you'd need to:
put the content somewhere else
I haven't tested this, but it might be possible to utilise the CDN capabilities of SharePoint. It needs admin control, but perhaps there's a one-off location you could use for this. See more here
Update: I did more research, but unfortunately the SharePoint CDN can't be used for this as it is configured to only accept requests from SharePoint pages themselves (i.e. the content can't be used outside of SharePoint). I created a uservoice request for this, in case others want to up-vote it.

O365 SharePoint Site - How to replace the default Master Page?

We created an HTML file with Office Fabric UI to make it responsive. Our intention is to integrate the HTML file we created with O365 SharePoint site and make it as our Intranet Home Page.
So, please let us know how to replace the default Master Page with our custom file. Any pointers to appropriate pages would be very helpful.
Account Info: Office 365 Business Essentials with SharePoint Online (Plan 1).
Thanks in advance.
As changes happen on SPO pretty much every week, it might not be a good practice to customize your branding through the master page when you are dealing with SPO. The reason is SPO's master page might be changed based on SPO new release. An alternative solution is to think about custom CSS and JavaScript injection through SharePoint CustomAction. You can reference PnP Partner Pack for site collection provisioning sample with responsive design.
If you really need to custom master page, you probably follow the exactly same way as SharePoint 2013 on premise environment to upload your master page and page layout. You can reference to How to: Convert an HTML file into a master page in SharePoint 2013 for detail information.

Outofbox SharePoint Presence Control to use UCWA Lync API

Our SharePoint 2013 customer need to display Lync presence on the client web browsers without installing Lync Client on the client PC
I am not familiar a lot with Lync development and SharePoint integration with it however I know for SharePoint 2013 and Lync 2013 was impossible because presence control is based on browser plugin as mentioned here
http://blogs.msdn.com/b/tomholl/archive/2013/03/02/integrate-lync-into-your-intranet-sites-using-the-namectrl-plug-in.aspx
I make a search and found that there is a new API for Lync UCWA that target mobile and web development
I think SharePoint team will use this Lync API on the future (or maybe they already use it) to display users presence without require Lync client to be installed
The Question is:
Is their any news about this from SharePoint team? Or no news till now?
I'm quite sure in saying that there's been no announcement around this.
The components in SharePoint 2013 (also SharePoint Online / 365) are still using the ActiveX control you mention, which requires Lync client running and signed in on client machines indeed.
However UCWA could address the requirement of retrieving and displaying users' presence. The challenge in this is how to perform the authentication: we'd need to authenticate the user or a valid Lync user in order to use UCWA and perform our queries.
Viable option is to use Integrated Windows Authentication, but is very subject to browsers and users configuration.
http://ucwa.lync.com/documentation/gettingstarted-authentication
Whenever we're authenticated with UCWA, we need to replace the OOB controls and views to make use of UCWA in place of namectrl.
This goes over:
XSLT used by Content Query Web Parts
Display Templates used by Content By Search Web Parts
Client Side Rendering (CSR) templates for lists and fields (JSLink)
Web Parts as Contact Person, Site Members, ..
probably more..
This article provides a detailed overview about the different templates for contact presence included in SharePoint 2013
http://www.sharepointcolumn.com/lync-presence-indicators-in-sharepoint-2013/
As I mentioned, authentication can be a challenge, so you may want to move the communication with UCWA in a server component, and expose more friendly APIs to use in your components, maybe not requiring authentication (for intranet use), or having another type of authentication in place for this.
An old project actually doing this:
https://htmlpresencecontrols.codeplex.com/
This is build using UCMA on the server, because UCWA wasn't available at that time. The UCMA part could be replaced with UCWA right now, having much less installation impact.

Sharepoint: get number of sites in a collection

I'm trying to get the total count of subsites created in a very large Sharepoint collection. Please note, I don't have direct access to the server.
Is there any native sharepoint feature I'm missing that will provide a site count?
Is there a webservice that can crawl the collection? (we have google analitics)
Are there any other options short of running a powershell script on the server?
Thanks!
I would suggest using the 'Webs' Web Service - you can invoke it by putting /_vti_bin/webs.asmx on the end of your site URL. It has a method GetAllSubWebCollection.
The only gotcha is that you will get filtered results based on the user being used to access the web service. For example, if you have a site collection that has a sub-web created for HR, Business, Management, Sales and IT - but your account only has access to the HR and Sales site - you will only get results back for the HR and Sales sites.
You may also find the SPServices jQuery library helpful as it has wrappers for most of the web services and can make calling them from a client much less painful.
Note: These web services exist for the 2007 and 2010 editions of SharePoint. You didn't mention a specific version but hopefully it is one of these two.

Viewing a MOSS 2007 page as another user would see it - without logging in as that user

In Moss 2007 you have the ability to set the target audience for each individual web part within a page. Is there a way to preview how the page will look to another user without logging in as that user? What I am looking for is a way for someone with full control/design permissions on a site to be able to preview how the site will be displayed to another user. Any suggestions?
I have a few test accounts that our IS department uses to preview pages, however we do not allow non-IS departamental staff to use those accounts. Those staff members only have access to their one account. So, if a user makes changes the target audience on a web part on one of their pages, right now they have no way to preview how the page will look to someone else other than asking someone else to login & watching over their shoulder. I can't give out the account information for the test accounts, nor can I create new test accounts.
Thanks!
Edit: I have the ability to preview. The problem is that other users with full control of a site can't preview the page. Here's a scenarios: In my school division each school has a site. The principal has full control of his school's site. On the landing page, he wants all the school announcements to be visible. However, some should only be visible to teaching staff, while others need to be visible to the students. He uses audience targetting but cannot preview to see at a glance that the targetting is correct. A lot of the users are not computer savy so things need to be as simple as possible. Also, that was just one scenario, there are other scenarios that are not divided by school. There are many users with full control of a site with different requirements - so it's not feasible to create test accounts for all scenarios.
First I don't think it is possible to have a preview feature if you are using NT security. Maybe it is something you can do with forms authentication but I never used it.
On that subject. I think when you are developing new features or integrating stuff on a MOSS/WSS server you need a little flexibility.
With what I see you have to following things you can do. It is surely more cost effective than developing a custom solution. I assume you are using NT Security.
User accounts : Ask your domain administrator to have dedicated user accounts to play with.
Virtual Machines : Ask to have some virual machines to be able to play with that server combined with tests accounts
Sandboxed environment : Ask your IT dept to create a sandboxed MOSS environment to have to possibility to replicate your actual MOSS environment and create custom user scenarios.
Edit: After re-reading the question I released that you want the users to be able to preview a page. I think you will need to look into writing a preview control that uses Impersonation to load the page. Not sure how feasible this is, but surely someone has created a preview feature. Sounds like a pretty common scenario to me.
Old Answer:
Could you not fire up a non MS browser such as Firefox, which will prompt for the username and password.
You can then just clear the session cookies to be prompted to log in as someone else.
This is the technique I used for an ASP.Net site that used authentication against the domain in a similar manner to SharePoint.
Alternatively, you can create a control/webpart that hooks into the audiences for the site and displays the audience membership to the user (maybe from the GetMembership call). This does not preview the site, but it will give your editors a heads up on who is in each audience. Something that will help them get the audiences correct.
We have made a similar webpart for security group membership.
I think there are two approaches you can take:
Do make use of test accounts to preview the pages. You can ease the "pain" to log in as another user by making use of the RUNAS command (http://technet.microsoft.com/en-us/library/bb490994.aspx). So it's possible to just create a shortcut on the desktop that opens a browser making use of another account's credentials. Only that browser instance will work with the test account.
Make a copy (or more copies) of the page that you want to preview, store it in a secured site (so it's only accessible for the principal for example), and tweak the Audience Targetting properties of the web parts on that page/pages.
For previewing target audiences only, the only way to do it is to create a target audience that runs based on a properties in the SSP User Profile Properties.
You can then have a control that allows the editor to change the value stored thier profile, re-compile the profiles and voila (for some description of voila) the user will have change thier audience targetting values to something else.
This would need quite a bit of coding and some thought put into the rules for the audience targetting.
At the end of the day, the most cost effective way is to push back to your infrastructure guys for an account solution that will allow you to have an "reader" account people can use for this function.

Resources