Thursday, October 12, 2017

Prevent users from creating Site Pages – SharePoint admin center in Office365

Introduction

Usually users who have permission level greater than Contribute (Contribute, Edit, Design, Full Control) level will be able to create Site Pages in a SharePoint site.

Creating site pages feature can be disabled from SharePoint admin center, so that any user will not have the option to create site pages.

Steps

  1. Go to SharePoint admin center in Office 365
  2. Go to settings

  3. Prevent users from creating Site Pages–SharePoint Online 1
  4. Under section “Site Pages”
  5. Select ”Prevent users from creating Site Pages”

  6. Prevent users from creating Site Pages–SharePoint Online 2
  7. Click OK at the bottom
  8. Now your users including the site collection administrators will not see create Site Pages option from the “New” dropdown action.

    Prevent users from creating Site Pages–SharePoint Online 3
What does “Prevent users from creating Site Pages” in SharePoint admin center option do?
  • It prevent users from only creating Site Pages (which are modern site pages), the users can create Wiki Pages and Web Part Pages

    Prevent users from creating Site Pages–SharePoint Online 4



Wednesday, October 4, 2017

Kalmunai IT Hub Monthly Meetup and Expert Talks – October, 2017

I will be speaking at Kalmunai IT Hub monthly meetup and Expert Talks for the month of October
Title: Host Your Web Sites in Microsoft Azure Web Apps

Date: 7th of October 2017
Time: 3.30 PM to 5.30 PM
Venue: BCAS Kalmunai Campus

Event Url:
https://www.facebook.com/events/106434413438852/

Kalmunai IT Hub - Suhail Jamaldeen - Suhail Cloud

Updated On: 09th of October 2017
Slides which used for the event.



Some clicks during the event


Kalmunai IT Hub - Suhail Jamaldeen  (2)Kalmunai IT Hub - Suhail Jamaldeen  (3)Kalmunai IT Hub - Suhail Jamaldeen  (1)

Thursday, September 28, 2017

Get the visual view of the model in Entity Framework Code First

Introduction

In this post we will discuss how to generate visual view from the models in Entity Framework Code First.

I’m using Visual Studio  2017 as the tool and Entity Framework version 6.

Solution Structure

I have two projects in the solutions.

  1. BlogSample.BO
    In this project we will have all the Business Objects.
  2. BlogSample.DAL
    This is  the data access layer and we have installed Entity Framework 6 and created DbContex and the Dataset. Also the BlogSample.BO project has been referenced as well.

Step 1

Install Entity Framework 6 Power Tools Community Edition

In Visual Studio go to Tools –> Extensions and Updates.

Search for Entity Framework 6 Power Tools and install the extension.

See the image below. I have already installed.

Entity Framework 6 Power Tools Community Edition - Suhail.Cloud


Step 2

Make DAL project as Startup project. Right click on the Context.cs file and go to Entity Framework –> View Entity Data Model.

Entity Framework 6 Power Tools Community Edition - Suhail.Cloud2

Your .edmx visual diagram will be generated as below. 

Entity Framework 6 Power Tools Community Edition - Suhail.Cloud


Solution

The solution is available in the below url.

https://drive.google.com/file/d/0ByEnOE8DAdvhYXhCTU5nVEdBR3M/view?usp=sharing

Monday, September 11, 2017

SharePoint Framework (SPFx) Client Side Web Part – Learning Path

Will be updated frequently

Introduction

In this post, I will share the learning materials (articles, videos, blogpost, microblog post) with related to SharePoint Framework Client Side Web Part.

Going through these materials will make you a great SharePoint Framework Web Part developer.

Angular JS 1.x with SharePoint Framework client side web part

Angular (Angular JS 2 +) with SharePoint Framework client side web part

Saturday, September 9, 2017

WebHooks in SharePoint Online – Post 1 – Introduction

“WebHooks in SharePoint Online” will be a series of blog posts.

  1. WebHooks in SharePoint Online – Post 1 – Introduction

This is the first post of the series and this post will be on introduction to SharePoint Online WebHooks.

Introduction to WebHooks

WebHooks are HTTP services where the subscribers will notified of events happening. Not only Office 365 or SharePoint uses WebHooks, but it’s a universal model used by Facebook, GitHub, MailChimp etc.

Introduction to WebHooks in SharePoint Online / SharePoint Online WebHooks

WebHooks in SharePoint Online are used for Document Libraries or lists. WebHooks in SharePoint Online are asynchronous event supported, which means that the notification is pushed to subscribers when items are added, updated, deleted or moved. WebHooks in SharePoint Online are not synchronous (“-ing”) event supported. Microsoft recommends Remote Event Receivers for synchronous events.

Why WebHooks over Remote Event Receivers

  • WebHooks are easier to consume by “non-SharePoint” developers

Advantages of SharePoint Online WebHooks

  • Easy to subscribe and push notification
  • Automatic retry is available on failure up to 5 minutes
  • Deleted event is available
  • Universal model
  • Can be used in modern SharePoint development stack such as SharePoint Framework

Disadvantages of SharePoint Online WebHooks

  • The subscription period will be expired automatically in 6 months and the subscribers have to re subscribe.
  • You cannot use webhooks to cancel an operation.
  • SharePoint Online lists and libraries are available.
  • No synchronous method is supported.
  • Acknowledgement must be received quickly within 5 seconds.
  • Subscription and notification uses the same url. The developers should implement their own logics to differ the calls.

Keep in mind when you develop solutions using WebHooks

  • WebHooks are only for asynchronous calls
  • Send the acknowledgement within 5 seconds
  • Implement a way to update the subscription if it is about to expire.

Tuesday, September 5, 2017

Access SharePoint group users from SharePoint Hosted Add-in through Rest API

Introduction

I was using SharePoint rest api in order to read the users from a SharePoint group.

  

   var url = _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups/getbyname('" + groupName + "')/users";


We can use the Add-in web url since the groups are inherited from the parent site (Host web) to the add-in web.

Problem

When a user (other than the site collection administrator) try to access the above rest url, it throws access denied exception.

Access denied when trying to get users from SharePoint group


Solution

Step 1

Go to “People and groups” under Site Setting.

Step 2

Select the group and then go to “Group Setting” under Setting.

image

Step 3

Then select “Everyone” radio button for the "Who can view the membership of the group?" option.

image

Step 4

Click OK

Conclusion

Now other users also will have  the permission to read the users in the group.

image

Friday, August 25, 2017

Add an Attachment to a list item with PnP JS Core library and Dropzone.js

Introduction

I was using ng-dropzone which is a AngularJS directive for dropzone.js and PnP JavaScript Core Library in order to add an attachment for list item.

I was following this url in order setup dropzone.js in my SharePoint hosted add-in.

In order to add an attachment to SharePoint list item please do the below changes.

  1. Replace $scope.dzCallbacks as below
  2.   
          $scope.dzCallbacks = {
                'addedfile': function (file) {
                    console.log(file);
                    $scope.dropZoneFiles.push(file);
                },
                'success': function (file, xhr) {
                    console.log(file, xhr);
                },
            };
  3. Add below function to insert item and add attachment

Since my solution is a SharePoint hosted add-in I’m using crossDomain call and you have to replace your addinWeb and hostWeb url and also your have to change the list name. My list name is “abc”

  
     $scope.saveItem = function () {
          
            $pnp.sp.crossDomainWeb(addinWeb, hostWeb).lists.getByTitle("abc").items.add({
                Title: "Title",

            }).then((result) => {
              
                $scope.dropZoneFiles.forEach(function (file) {
                    var toUpload = file; 
                    
                    var r = new FileReader();

                    r.onloadend = function (e) {
                        var data = e.target.result;


                        item.attachmentFiles.add(toUpload.name, data).then(function () {
                            alert()
                        });
                    }

                    r.readAsArrayBuffer(toUpload);
                    
                    console.log(result);
                });
            }

Conclusion

The item will be created and the attachment will be uploaded.

Monday, August 7, 2017

Sri Lanka SharePoint Forum monthly gathering – August

Come join us on 9th, August 2017 for Sri Lanka SharePoint Forum monthly gathering.

I will be speaking on "Build SharePoint Online Workflows and Customize Forms Using Nintex for Office 365"

Event Url: https://www.facebook.com/events/1531294496931216/?ref=46

20663701_10155529431892482_5738861410474645855_n

Updated On: 09th of August 2017

Slides which used for the event.


Some clicks during the event

Suhail Jamaldeen (1)Suhail Jamaldeen (2)Suhail Jamaldeen (3)Suhail Jamaldeen (4)

Friday, August 4, 2017

SharePoint Modern Page Quick links web part missing Layout option?

Introduction

Some of the Microsoft documented features, which are related Office 365 to are not available for some tenants. I noticed that from SharePoint Online modern experiences – some of the features were missing. Here is the conversation I started.

It’s because my tenant is not configured to First Release

First release candidates receives the Office 365 updates immediately.

Problem

According to support.office.com, Quick links web part in SharePoint Modern Pages should show a "layout" option where we can select either Compact or Film Strip. But my development site and client's site doesn't show such options. Any idea?

My developer site is given below.

Capture.JPG

Solution

I added my tenant to “First release for selected users” in Office 365 Admin Center.

Step 01. Go to Admin Center from the Quick Launch

Step 02. Select “Organization profile” under Setting.

imageStep 03. Under Release preferences, select Edit under Actions dropdown

image

Step 04. Selection the option “First release for selected users” and click Next

image

Step 05. Click Yesimage

Step 06. Then you have to add people. I have added people who are managing sites, because they are the people who are going to customize the sites.  

And then Hit Save

image


Conclusion

Once I did the above configuration, I was able to see the First Release features in my Office 365 Tenant. It may take some time.

image


Wednesday, August 2, 2017

How to request for a code review in Visual Studio - Tamil

This is my first YouTube session related to Technology.

I would greatly appreciate it if you kindly give me some feedback and your feedback will definitely help me a lot in future.


Remove the Header area from the Modern SharePoint pages

Introduction

Recently one of clients wants to remove the header area from their SharePoint modern page which consume lot of space.

Till date SharePoint Online doesn’t provide such feature to remove the header.

image

Solution

Step 01. Open the particular page in SharePoint Designer and edit using Advanced Editor 

Step 02. Change Page Layout Type from Article to Home. For that search for <mso:PageLayoutType and change the value as given below.

<mso:PageLayoutType msdt:dt="string">Home</mso:PageLayoutType>

Conclusion

Now the header is gone.

image

Access Denied

If you get “Access Denied” error, follow this link and get resolved.


Saturday, July 22, 2017

Develop SharePoint Framework projects in Visual Studio 2015/2017

Introduction

You will come across so many tutorials on SharePoint Framework (SPFx) which were illustrated using “Visual Studio Code”. But don’t worry you can develop SPFx projects using Visual Studio.

Recently “SPFx Project Template for Visual Studio” was released in GitHub. In this post we are going to see how to install “SPFX Template” and create a new SPFx project after installing the extension.

As of today the extension supports Visual Studio 2015 and Visual Studio 2017.

Steps

Step 01

Go to GitHub Releases page and download the latest .vsix file. Reason for downloading from GitHub is that you may not find the latest in Visual Studio Extension Gallery.

image

Step 02

Double click on the download template and install.

Select the Products and click install.

image


Step 03

Open Visual Studio and add New Project (File –> New –> Project)

Under Templates you will see “SharePoint Framework”. Select it and click OK

image

Step 04

Then you have to Select a framework which you are going to use; Give Component Name and Component Description.

Also you can select the check box if you don’t want to install Dependencies. Usually installing dependencies make our life easier, So keep it as it is.

Click on Generate.

image

Conclusion

It took me around 15 minutes to create a new project. So keep calm when you are trying to create a new project.

Your solution will be looking as below and you can start working on the solution.


image


Run the project by clicking “Start” and your first Workbench project will be opened in the browser.

image

By clicking on + You can add SPFx webpart. 

Tuesday, July 18, 2017

Content Search in the Office 365 Security & Compliance Center

Introduction

Content Search in the Office 365 Security & Compliance Center let us to search for emails, documents, Skype for business conversation, Microsoft Teams data and threads, Office 365 groups, SharePoint Online items and more.

Navigate

Go to https://protection.office.com and Select “Content Search” under “Search and investigation”

image


Real world examples

I would like to address some real world example where we can use Content Search and if you come across few more please comment; so that all will know.

  • Get all documents with one or more particular word in documents which are stored in SharePoint Online or OneDrive
  • You notice that data belongs to a particular department is shared with another. So you have to search for all the user’s emails, chat history and other Office 365 services.
  • What confidential information are shared in public folders. You can search by one or more term.
  • Get Search statistics for audit purposes.
  • Want to exports keyword statistics to a local location.
  • Are people discussion on a particular topic in Microsoft Teams.
  • Check whether a client contacted your business team through Skype for Business.

and many more.

New Search

You can click on +, give a name for the search, provide search location.

Also you can give some conditions.

image


Search Results

You can see the Search results from the below image.

image

You can click on Preview search results and navigate to detailed preview and also from there you can navigate to original url and see the original item.

image

Reference

Wednesday, July 12, 2017

Going to delete a Microsoft Teams channel and recreate it – Read this...

Problem Background

I deleted a channel in Microsoft Teams and when I try to recreate the channel there was a error message saying “Another channel already has that name. Try a different one.”

image


So, till date (12th of July 2017) Microsoft Teams don’t allow to create a channel with the same name which was already deleted.

See this thread for more.

Alternative

Let’s say you have to delete a channel and recreate with the same name. What you can do it simply rename the channel and delete it.

Once you delete with the new name you can create with the old name but not the new.

Future

We all hope that Microsoft will provide us a solution to overcome this issue and in future we can use PowerShell to do a hard delete.




Tuesday, July 11, 2017

Start a thread in Microsoft Teams channel via Email

Introduction

You can start a thread in a Microsoft Teams channel by directly sending an email to a Microsoft Team channel, so that the channel members can see, like save and reply to the thread.

Also you can share the channel email address with the third party, so that they can email to the channel using their own email address like gmail, yahoo and others.


Steps

Step 01

Login to https://teams.microsoft.com and go to Team and click on three dots “…” of your channel.

Step 02

Then click on Get email address.

image


Step 03

Once you click you will get a popup with channel email address. Copy the email address and you can start a thread directly by sending email.

image

Conclusion

You can see my two threads started via email. The first one is by using Office 365 email and the second one by my personal Hotmail.

image

Limitation

By today the reply to a thread started via a email can only be seen in Microsoft Teams.

image


Monday, July 10, 2017

How to enable sideloading of apps for Microsoft teams

Introduction

I started building apps for Microsoft teams. Before we start developing we need to enable side loading as a prerequisite.

Solution

Step 01.

Login to your Office 365 portal with admin account

Step 02

Click on Service & add-ins under setting tab

image

Step 03

All your services and add-ins will be shown. Click on Microsoft Teams

image


Step 04

Under Apps  change the state of Allow external apps in Microsoft Teams and Allow sideloading of external apps to on as give below.

image


Thursday, June 29, 2017

Query List and read all items in Nintex Workflow for Office 365

Introduction

Query List in Nintex Workflow for Office 365 used to get list items. You can select all list items or select items when a condition is true.

Here I’m going to illustrate how to select all the items and log into workflow history list.

I have a list and it has three columns. 1. Title 2. Body 3.Subject.

Solution

Step 01

Add “Query List” action into workflow from the left menu and select the list. Select  the Editor Mode; in my case I have selected “Query Builder” and  have checked “Select all list items” radio button.

image

Then under “Columns to select” category select the columns you have to use. Your output should be “Collection type”.

image

image


Step 02

Now you have to add “For Each” action. There you have to select the Collection which we defined in Step 01.

You have to define a workflow variable as Text and select in “Output value”; also you have to select Output Index and it should be an integer.

image

image

Step 3

Then add “Get Item From Collection” action and select “Target Collection”. You can select the collection which we created in the above step.

Select the index and also select the “Output”. Refer the screen.

image

Step 4

Then log the data you want to see.

image

You can see the History log by item by item.

image

Conclusion

I have shared the Nintex workflow file. You can import and have a look.

https://drive.google.com/file/d/0ByEnOE8DAdvhY3F6VEF0SWlRcXc/view?usp=sharing