Quantcast
Channel: SharePoint – SharePoint Rider
Viewing all 55 articles
Browse latest View live

Site Property Bag Manager

$
0
0

SharePoint Property Bag is a great option to store configurations at different levels of the SharePoint hierarchy outside of the application itself. The same property bag entry can be used in SharePoint Search once it is crawled. Based on the requirement we can decide if we need a property bag item with crawl enabled or not.

In the sample SharePoint Hosted app attached, I have mentioned the list of supported properties as I do not want to modify the OOTB properties. Please use this app as starter kit and leverage the same according to your requirement.

Note

Supported Properties

 

Supported Properties - Choices

 

Grid

Edit Supported Property

Download Code


Filed under: AngularJS, O365, SharePoint

Deploying Multiple Provider Hosted Apps in a Single Azure Web Site

$
0
0

Is it possible to host Multiple Provider Hosted Apps in a Single Azure Web Site?

The answer is Yes. If yes how?

Here you go…..

  • Create Azure Site
  • Create Required App Folders
    1. Go to azure web site
    1. Click on the Configure link in the top navigation for the web site
    1. Scroll to the bottom of the page and enter the values for your new virtual paths as shown below:

1

Note: Make sure you check the Application checkbox.

  • Register your apps using appregnew.aspx page as shown below

2.png

Note: Here I am adding my virtual directory sub folder name(App1 and App2) after azure website URL.

  • Your app manifest file should look like this

3.png

Note: Here I am adding my virtual directory sub folder name(App1 and App2) after ~remoteAppUrl. If you don’t have Remote Event Receiver in your app, you do not need to configure InstalledEventEndpoint and UninstallingEventEndpoint.

  • Publishing configuration(App Web Project) should be something like this

4.png

Note: Here I am adding my virtual directory sub folder name(App1 and App2) after site name.

  • Finally the app package configuration should be like this

5.png

Note: Here I am NOT adding my virtual directory sub folder name(App1 and App2).

Let me know if you  have any questions on this.

The post Deploying Multiple Provider Hosted Apps in a Single Azure Web Site appeared first on SharePoint Rider.

Azure Traffic Manager for Provider Hosted Apps – Global Load Balancing

$
0
0

Microsoft Azure Traffic Manager allows us to control the distribution of user traffic to the specified endpoints (Zone Specific Azure Sites).

Azure Traffic Manager gives us three traffic routing methods to choose from:

  • Failover
  • Performance
  • Round robin.

We can choose the one that is right for our application or scenario.

Advantages

  • Traffic Manager can improve the availability of important applications by monitoring our Azure sites and automatically directing users to a new location anytime there is a failure.
  • Traffic Manager makes applications more responsive and improves content delivery times by directing users to an Azure or external location with the lowest network latency.
  • Traffic Manager can direct user traffic to distribute it across multiple locations

Steps to load balance provider hosted apps

  • Create Azure websites in different zones
  • Create a Traffic Manager profile
  • Configure End Points (Zone Specific Azure Sites)
  • Point the company Internet domain(https://providerapps.sprider.com) to a Azure Traffic Manager domain(https://sprider.trafficmanager.net)
  • Publish the web deploy packages separately in each azure website. We need to do this two times, one for each azure website data center location.
  • The azure website virtual directory is accessible using the TM URL ). So while registering the app we must give the TM URL for the following parameters
    • App Domain:      providerapps.sprider.com
    • Redirect URI:     https://providerapps.sprider.com/POCRER/Pages/default.aspx

drawing1.png

Reference

https://azure.microsoft.com/en-us/documentation/articles/traffic-manager-manage-profiles/

The post Azure Traffic Manager for Provider Hosted Apps – Global Load Balancing appeared first on SharePoint Rider.

SharePoint Framework Web Part – Continuous Integration and Delivery

$
0
0

Continuous Integration and Delivery are the foundations of Modern Software Development. Continuous Integration and Delivery process is going to help your team in the following aspects:

  • Revision Control
  • Build Automation
  • Automated Deployment
  • Reduced Overhead
  • Consistent Build Process
  • Confidence and Team Communication
  • Risk Mitigation

In this article, I am going to show you how to set up Continuous Integration and Delivery for SharePoint Framework Web Part.

Tools Needed 

  1. Visual Studio Team Service – Source Control System
  2. Visual Studio Code – Code Editor
  3. SharePoint Framework Development Environment – Refer
  4. Git Repository Project in Visual Studio Team Service(VSTS)
  5. Git Commands
  6. A SharePoint Document Library that acts as a CDN
  7. SharePoint App Catalog Site
  8. A SharePoint Site to test the app

SharePoint Framework(SPFx) Git Project Configuration

The first step is to create a SPFx Git Repository Project in VSTS.

snip20170818_1.png

(Example)

Let us clone the newly created Git project into your favorite local folder using the following git command

git clone -b master repopath

SharePoint Framework(SPFx) Web Part Setup

Go to the project directory using command prompt/ terminal and set up your SPFx Web Part project as explained here. I am going to use my sample code here but feel free to write your own logic in your SPFx Web Part.

This is my project folder structure

snip20170818_4.png

One Time Activity

Let us package artifacts and upload the files in app catalog site and CDN library.

Open the write-manifests.json file under config folder and update the cdnBasePath parameter with your CDN SharePoint Document Library path.

snip20170818_8.png

Make sure you are still in the project directory you used to set up your web part project. In the console window, execute the following gulp task:

snip20170818_9.png

This will build the minified assets required to upload to the CDN library in temp\deploy directory. Go to your CDN SharePoint Library and upload the generated files.

snip20170818_11.png

snip20170818_14.png

In the console window, execute the following gulp task to package your client-side solution that contains the web part:

snip20170818_10.png

The command will create the .sppkg package file in the sharepoint/solution.

snip20170818_12.png

Go to your App Catalog site and upload the generated .sppkg file to the App Catalog. This will deploy the client-side solution package. SharePoint will display a dialog and ask you to trust the client-side solution to deploy. Click deploy.

snip20170818_13.png

At this point the web part is ready to be used on a page. Open a site where you want to test the web part and go the Site contents page of the site. Choose Add – App from the toolbar and choose the your app to be installed on the site.

snip20170818_16

After the app has been installed, add the webpart in a page

screen-shot-2017-08-18-at-10-36-17-am.png

Check-in the code and push the same to master branch via Visual Studio Code editor.

Climax

At this point we are ready integrate our SPFx web part project repository with VSTS continuous build and release process.

Gulp Tasks

Upload the highlighted custom gulp tasks provided by Elio Struyf and install the necessary npm packages as per the instruction given.

snip20170818_7.png

Update the gulpfile.js as shown below:

snip20170818_6.png

Continuous Integration and Delivery Setup in VSTS

Switch back to VSTS

Go to build & release section and click New buttonscreen-shot-2017-08-18-at-10-43-52-am.png

Select the empty template and click Apply.

Variables

Configure the following variables for the build and release. Adjust the values as per your environment.

snip20170818_28.png

Tasks

Add the following tasks and configure it as shown below

Process

snip20170818_19.png

Get Sources

snip20170818_20.png

NPM Install – npm

snip20170818_21.png

Update CDN Location – Gulp 

snip20170818_22.png

Bundle Project – Gulp

snip20170818_23.png

Package Solution – Gulp 

snip20170818_24.png

Upload Files in CDN – Gulp

snip20170818_25.png

Upload App Package to App Catalog – Gulp 

snip20170818_26.png

Deploy App – Gulp 

snip20170818_27.png

Trigger

Also enable the continuous integration settings so that the build process starts when the latest code is checked-in in master branch.

snip20170818_29.png

All done. Now it is time to test our continuous build and release process by pushing a new code change to git repository and check build process get triggered.

Code Change 

Let us change the progress bar color to red and check-in the latest change to git.

screen-shot-2017-08-18-at-11-23-24-am.png

Commit & Push Code Changes 

screen-shot-2017-08-18-at-11-26-05-am.png

screen-shot-2017-08-18-at-11-26-25-am.png

Build and Release Status

screen-shot-2017-08-18-at-11-30-18-am.png

snip20170818_31.png

snip20170818_32.png

snip20170818_33.png

snip20170818_34.png

As you can see in the screenshot, the latest code got updated and progress bar color is reflecting.

Email Notification

snip20170818_35

Note: You can isolate the deployment process from the build process using a release template.

The post SharePoint Framework Web Part – Continuous Integration and Delivery appeared first on SharePoint Rider.

Top 50 SharePoint Blogs And Websites by Feedspot

SPFx Extension – Email Item/File URL

$
0
0

In SharePoint there used to be a ‘copy shortcut’ option in the right-click menu on a document. This feature is not available currently. Now we need to go to the share sub-menu to get a link to the document, but what is offered there is the docidredir link, not the full path.

This SPFx extension opens a dialog where the user can see the document full path. The Email Link button helps the user to share the link via default email client.

react-command-email-urlreact-command-email-url

Used SharePoint Framework Version

SPFx v1.6

Applies to

Solution Author(s)
react-command-email-url Joseph Velliah (SPRIDER, @sprider)

Version history

Version Date Comments
1.0 October 20, 2018 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.

Minimal Path to Awesome

  • Clone this repository
    • Open serve.json file under config folder. Update PageUrl to the URL of the list you wish to test. react-command-email-url
  • Move to folder where this readme exists
  • In the command window run:
    • npm install
    • gulp serve

Features

This project contains SharePoint Framework extensions that illustrates the following features:

  • Command extension
  • Office UI Fabric React

Notice. This sample is designed to be used in debug mode and does not contain automatic packaging setup for the “production” deployment.

The post SPFx Extension – Email Item/File URL appeared first on SharePoint Rider.

Displaying SSRS Reports in External Applications using an iframe – SQL Server 2016

$
0
0

Problem Statement

After upgrading the SQL Server Reporting Service to 2016, the SSRS reports embedded in different applications including SharePoint pages using an iframe tag or page viewer web parts were stopped rendering.

iframe1.PNG

Error

erroriframe

Workaround Tried

I tried to fix this issue by adding the following entries in the rsreportserver.config but no luck.

report config file.png

The rsreportserver.config file is installed in the following location by default:

SharePoint Mode

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\WebServices\Reporting

Native Mode

C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer

Solution

Added rs:Embed=true as a query parameter at the end of the report URL and this fixed the issue and reports started working properly.

iframe2.PNG

The post Displaying SSRS Reports in External Applications using an iframe – SQL Server 2016 appeared first on SharePoint Rider.

Add Modern SharePoint Site Page in Microsoft Teams

$
0
0

Microsoft Teams is a chat-based workspace that brings together people, conversations, content, and tools for easier collaboration. SharePoint sites include the modern page feature, which allow you to engage the team members with important or interesting stories. Here I am going to show you how to display a SharePoint modern page with in teams as a tab.

I have created a SharePoint modern page as show below:

samplemodernpage.png

Set up SharePoint Modern Page in Teams

  • In Teams, navigate to the team where you want your SharePoint page to appear.

teams1.PNG

  • Click the plus sign to add a new tab.

teams2

  • Click on Website

teams3.png

  • Provide a Tab name and SharePoint Modern page url and click Save. Optionally we can select Post to the channel about this tab check box to communicate this change with the users.

teams4

  • That’s it! Now, every time you visit your team, the newly added tab will appear as part of the teams as shown below

teams5.png

  • You can use the expand / collapse button to view the content the way you like

teams6

Notes :

  • I don’t know if you noticed, but the out of the box sharepoint controls such as Suite Bar, Left Navigation, Search Box, Page Title Area and Command Bar are gone within teams.
  • If you have custom webparts within the page, you can not edit properties of those within teams.
  • You can not change the web part arrangement sequence within teams.
  • You can not display classic page.

The post Add Modern SharePoint Site Page in Microsoft Teams appeared first on SharePoint Rider.


SharePoint Online – Analyze User Feedback using Sentiment Analysis API and Microsoft Flow

$
0
0

The Sentiment Analysis API provided by Microsoft evaluates text input and returns a sentiment score for each document, ranging from 0 (negative) to 1 (positive). This capability is useful for detecting positive and negative sentiment in social media, customer reviews, and discussion forums. In this article I am going to show you how to send the feedback entered in a SharePoint online modern list item to Sentiment Analysis API and update the response back in SharePoint. Also I am going to show how to beautify the Sentiment score with emojis using column formatting feature.

Create a SharePoint list with the following columns

columns.PNG

At the top of the list, click Flow, and then click Create a flow.

newflow

Select the below flow template from the right-hand panel.

select flow type.PNG

Follow the instructions on the Microsoft Flow site to connect to the list we have created. Credentials will be verified for each service used in the flow. For Office 365 services such as SharePoint and Outlook, connections will be created automatically. The next steps will be performed in the Microsoft Flow designer. The first action displayed, also known as a trigger, will determine how the flow will be started. Additional actions may be added after the first. Each new action will be dependent on the previous action.

add new step.PNG

Next step is to add an initialize variable action to set the value of the current Item Id.

setitemid.PNG

Create a POST request using a HTTP action. Set the HTTP Method, URI, Headers and Body as shown below:

Note: Login to Azure and get the Ocp-Apim-Subscription-Key. Refer this article for steps.

CallSentimentAPI.PNG

Now let us parse the sentiment score from the response we received from the HTTP action and save the value in a variable using initialize variable action as shown below

SetSentimentScore.PNG

Expression : body(‘CallSentimentAPI’)[‘documents’][0][‘score’]

Here CallSentimentAPI is HTTP action name.

Let us update the sentiment score in the list item using a Send an HTTP request to SharePoint action as shown below

update list item.PNG

Save the flow and go back to the list.

Let us create a new item in the SharePoint list to check the sentiment score for our feedback

new item.PNG

If all goes well, we should see the sentiment score in the list column as shown below

data.PNG

We can check the status of every execution in the flow history as shown below

status.PNG

success run.PNG

To beautify the sentiment score with emojis, we can use SharePoint column formatting feature as shown below

column formatting

I have used the following column formatting formula to convert the sentiment score into emojis

formual.PNG

Hope you liked this post. If you have any questions on sharepoint or office 365, please let me know.

The post SharePoint Online – Analyze User Feedback using Sentiment Analysis API and Microsoft Flow appeared first on SharePoint Rider.

Microsoft Teams Custom Tab – Video Recorder App using SharePoint Framework

$
0
0

Summary

Sample SharePoint Framework client-side web part for Microsoft Teams Tab illustrating Video Recording using MediaRecorder Web API.

This is an experimental web part. Because this technology’s specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes

Teams Custom Tab

About

Add Custom Tab

API Management - MSGraph

Custom Tab

Applies to

Solution

Solution Author(s)
teams-tab-video-recorder Joseph Velliah (SPRIDER, @sprider)

Version history

Version Date Comments
1.0 November 20, 2018 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Minimal Path to Awesome

  • clone this repo
  • run npm i
  • go to this Microsoft article and follow the steps to package and deploy my sample
  • Go to your tenant’s API management page to approve the permission requests configured in this web part.

Features

This project illustrates the following concepts:

  • Building Microsoft Teams tab using SharePoint Framework
  • Packaging and deploying web part as a Microsoft Teams tab
  • Front/Back camera selection
  • Video recording using the supported browsers
  • Playback recording
  • Upload recorded video in user’s OneDrive root folder

The post Microsoft Teams Custom Tab – Video Recorder App using SharePoint Framework appeared first on SharePoint Rider.

Publish SharePoint add-in to Office Store

$
0
0

If you want your SharePoint add-in to appear in SharePoint Store, you need to submit it to the Seller Dashboard for approval. You can add and save your submission as a draft in your Seller Dashboard account until you’re ready to submit it for approval.

Prerequisites

  • Familiarize yourself with the AppSource validation policies
  • Seller dashbaord account 
  • Add-in file in .app format 
  • App logo 
  • App screenshots specific to supported languages 

Steps

This section lists the steps involved in submitting your SharePoint add-in in the Seller Dashboard.

Add a new app

On the overview page, click on Add a new app button 

Listing type

On the listing type page, select SharePoint add-in and click next

Upload package

On the overview page, provide the mandatory field details as shown below and click next 

Language details 

On the details page, select the necessary languages and provide the mandatory field details as shown below and click next 

Block access 

If you want to prevent the app purchases, select the countries / regions 

Lead management 

To get information about users who acquire your add-in, you can submit lead configuration details for your customer relationship management (CRM) system in the Seller Dashboard.

Pricing model

Choose the pricing model fits your need

Save as Draft or Submit 

On your summary page, select EDIT DRAFT and make your changes. Select SUBMIT FOR APPROVAL. After your seller account is approved, you can submit your add-in to the Seller Dashboard. You can make changes at any point before you submit for approval, but during the approval process, you won’t be able to make any changes.

The post Publish SharePoint add-in to Office Store appeared first on SharePoint Rider.

SPFx Extension – Profile Completeness Meter

$
0
0

With the profile completeness extension we can encourage or force users to fill their profiles. This sample SPFx extension renders a profile completeness score. By clicking the score, user can see the score details as shown below:

react-application-profile-meterreact-application-profile-meter

Used SharePoint Framework Version

SPFx v1.6

Applies to

Solution Author(s)
react-application-profile-meter Joseph Velliah (SPRIDER, @sprider)

Version history

Version Date Comments
1.0 February 13, 2019 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.

Minimal Path to Awesome

  • Clone this repository
    • Open serve.json file under config folder. Update PageUrl where you wish to test. react-application-profile-meter
  • Move to folder where this readme exists
  • In the command window run:
    • npm install
    • gulp serve

Features

This project contains SharePoint Framework extensions that illustrates the following features:

  • Command extension
  • Office UI Fabric React

Notice. This sample is designed to be used in debug mode and does not contain automatic packaging setup for the “production” deployment.

The post SPFx Extension – Profile Completeness Meter appeared first on SharePoint Rider.

Deploy SharePoint Framework Web Part using Bitbucket Pipelines & Deployments

$
0
0

Continuous Integration and Delivery are the foundations of Modern Software Development. Continuous Integration and Delivery process is going to help your team in the following aspects:

  • Revision Control
  • Build Automation
  • Automated Deployment
  • Reduced Overhead
  • Consistent Build Process
  • Confidence and Team Communication
  • Risk Mitigation

In this article, I am going to show you how to set up Continuous Integration and Delivery for SharePoint Framework Web Part using Bitbucket.

Prerequisites 

  1. Bitbucket Repository
  2. SharePoint Framework WebPart Solution associated with the Bitbucket Repository – (Refer – SharePoint Framework HelloWorld example)
  3. SharePoint App Catalog Site to deploy the SharePoint Framework WebPart
  4. Add the following environment variables on the Bitbucket repository level

At this point we are ready to integrate our SharePoint Framework WebPart solution with the Bitbucket Pipelines.

  • Open the SharePoint Framework WebPart solution and upload the following custom gulp tasks provided by Elio Struyf. (Note: Install the necessary npm packages given in the instruction)
    • upload-app-pkg
    • deploy-sppk
  • Create a new file for Bitbucket build configuration with name bitbucket-pipelines.yml 
  • Update the bitbucket-pipelines.yml as shown below 

  • Commit and the push the changes to Bitbucket repository
  • Go to the pipelines option and enable the pipeline

  • A build should start as soon as we enable the pipeline as shown below

  • As you can see in the screenshot, the SharePoint Framework WebPart is packaged and deployed in the app catalog site as per the logic written in the build configuration file

 

  • It is possible to isolate the deployment process in a seperate step as explained here.
  • Also schedule your pipelines to run a pipeline at hourly, daily or weekly intervals.

Hope you found this interesting.

Sharing is Caring!

The post Deploy SharePoint Framework Web Part using Bitbucket Pipelines & Deployments appeared first on SharePoint Rider.

Microsoft Graph API – Access Documents from SharePoint Document Library using Azure AD Application Credentials and Postman

$
0
0

Microsoft Graph is a RESTful web API that enables you to access Microsoft Cloud service resources. In this article, we will go through the requests we have to make in order to access the documents in a SharePoint Document Library.

Prerequisites:

  • Register an Azure AD app and allow the app to have full/read control to SharePoint sites in all site collections without a signed-in user. Refer the Microsoft Graph permissions reference here
  • Note down the Application ID(Client ID) and Key(Client Secret)
  • Download and install Postman that simplifies the API testing or any API Testing Tool

REST Calls involved

Get Access Token 

To call Microsoft Graph, your app must acquire an access token from Azure Active Directory (Azure AD), Microsoft’s cloud identity service. Access tokens issued by Azure AD are base 64 encoded JSON Web Tokens (JWT). They contain information (claims) that web APIs secured by Azure AD, like Microsoft Graph, use to validate the caller and to ensure that the caller has the proper permissions to perform the operation they’re requesting.

Copy “access_token” value from the following API call’s reponse. This value will be used in the subsequent REST API calls as bearer token.

Replace:

{tenant-id} with your Office 365 Tenant ID. You can find the same from here.

{client-id} with Application ID copied from Azure AD Application.

{client-secret} with Key(Client Secret) copied from Azure AD Application.

Get SharePoint Site ID

We have to get the SharePoint Site ID(highlighted) where document library is located using the following url:

https://graph.microsoft.com/v1.0/sites/{host-name}:/{server-relative-path}

Replace:

{host-name} with your SharePoint online root site url.

{server-relative-path} with site’s relative path.

Get Document Libraries from a SharePoint Site

To get a list of document libraries from a SharePoint site, call the following endpoint:

https://graph.microsoft.com/v1.0/sites/{site-id}/drives

Replace:

{site-id} with the site id received in the previous step.

Get Files from a Document Library 

To get a list of files in a document library, call the following endpoint:

https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/root/children

Replace:

{site-id} with the site id received in the previous step.

{drive-id} with one of the document library id received in the previous step.

Get a Specific File from a Document Library

To get a specific file from a document library, call the following endpoint:

https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/root:/{item-path}

Replace:

{site-id} with the site id received in the previous step.

{drive-id} with one of the document library id received in the previous step.

{item-path} with file name or path.

I hope this article has helped you to understand the REST API calls required to reach a file in a SharePoint Document Library using Graph API.

Sharing is Caring !

The post Microsoft Graph API – Access Documents from SharePoint Document Library using Azure AD Application Credentials and Postman appeared first on SharePoint Rider.

Get Office 365 Tenant ID from Domain Name

$
0
0

OpenID Connect describes a metadata document that contains most of the information required for an app to do sign-in. This includes information such as the authorization endpoint, token endpoint, tenant region scope, etc. For the discovery endpoint, this is the OpenID Connect metadata document you should use:

https://login.windows.net/{domain}/.well-known/openid-configuration

The {domain} can take one of two values:

Value Description
common Users with both a personal Microsoft account and a work or school account from Azure AD can sign in to the application.
contoso.com The friendly domain name of the Office 365 tenant

The metadata is a simple JSON. See the following snippet for an example.

Screen Shot 2019-06-16 at 7.04.26 PM.png

To get the tenant ID, we just need to parse the token_endpoint property as shown below:

Screen Shot 2019-06-16 at 6.50.58 PM

We will get the following JSON for the invalid domain name.

Screen Shot 2019-06-16 at 7.13.44 PM.png

Hope this helps. Sharing is Caring !

The post Get Office 365 Tenant ID from Domain Name appeared first on SharePoint Rider.


Viewing all 55 articles
Browse latest View live