Wednesday 31 July 2019

Provide Anonymous User Access to Office 365 SharePoint Files for Specific Duration

In this post, let us look at giving the access to the files for specified interval. This requirement might be very useful in several aspects. Say for example, the scenario could be like the form/documents that needs to be filled within the specified deadline once generated.

Giving access doesn't mean working with file/item level permissions. This approach provides ways to generate links for SharePoint files with necessary permissions, that could be accessible for sometime.

In the previous article, we have seen ways to create and share links, which is scoped to users/groups/anonymous users.

Microsoft has recently released an update, which has new set of actions. One such feature is stop sharing an item or file action.


Provide Access for Specified Time (Stop Sharing File)


From the previous post, we will go one more step ahead in revoking the provided access and sending out notification to user on the same.

Here 3 more actions are added.
  • Delay: As per requirements, provide a delay/wait time for flow to pause.
  • Stop sharing an item or folder: Revoke all the previously shared links.
  • Send an email : Notification to say the permissions has been revoked.

Note: Stop sharing an item or folder, revokes/removes all the previously shared links, irrespective of any scope and target audience. So for example, let us consider previously two type of scoped links are created and shared for an item/folder. Executing stop sharing action will revoke/remove all the share links for that particular item/folder.

Saturday 20 July 2019

Create and Share Scoped Links of SharePoint Files to Users using Microsoft Flow

Assume a file is getting generated/getting created by users on the SharePoint online platforms. The business wants to share the file links with the targeted groups/users, which is view-able or editable. This business process is automated using SharePoint’s in-built sharing feature and Microsoft Flow.

SharePoint online has an inbuilt share feature, for creating links for items/files on it’s platform (At the end of this article, this OOB share feature snapshot is shown for reference). The scope of this feature is available in the following levels.
  • Anonymous
  • Organization
  • Specific people

Microsoft Flow has a SharePoint action called “create sharing link feature for a file or folder”. At the time of writing, this action has the following scopes only.
  • Anonymous
  • Organization
Note: 
  • The type of access could be either 
    • view and edit
    • or, view
  • There is no scope for sharing it to specific people.

Wednesday 26 June 2019

Capture and Document User Information with Image on SharePoint - Part II


This is second part of article on capturing and documenting user details on to Office 365 SharePoint. The previous article shows setting up the Microsoft Flow to capture and creation of document with user details.
In this article, recording of user details is discussed. PowerApps forms are used to capture the user details. The details includes user name, picture, etc. Then integrating the form with Microsoft Flow is discussed.


Setting up the User Form

In my scenario, there are only two user entries recorded.
  • User Name
  • User Picture
Let us set the form.
  • Navigate to PowerApps portal/ app, and then select blank app.
  • From insert option, select two screens-
    • New blank screen - For user input
    • New Success screen - For showing user success message.
Screens & Controls Configured on the Form
Screens & Controls Configured on the Form

Tuesday 18 June 2019

Capture and Document User Information with Image on SharePoint - Part I


In this article, let us see how user details including user picture could be captured and saved onto SharePoint as documents using PowerApps and Microsoft Flow.

Here is the detailed scenario: User details like Name, picture, etc. needs to be captured and documented, and has to be made available on SharePoint. This process could be automated with the help of Office 365 SharePoint, PowerApps and Microsoft Flow.

The following points depicts this automated flow.
  • Using PowerApps, Custom Form needs to be created showing the required fields.
  • Microsoft Flow will be used to capture the information entered into the Form.
  • The flow once captures the information, it will format the data and creates the document, before saving it to SharePoint. 
    • Creation of documents is not straight forward approach. So in this case HTML file needs to be created. [The proper formatting could be done by taking HTML file creation approach.] 
    • Then HTML file is converted into required format. Then the target document could be uploaded into SharePoint library.
Note: One Drive for Business connectors provides necessary actions for creation and conversion of documents. The same will be leveraged in this samples.

Saturday 25 May 2019

Accessing SharePoint Data with SPFx User Tokens via Service Layers - Part II

We are looking at getting user tokens retrieved from SPFx solutions, and leveraging the tokens on Azure service layers to access the SharePoint data on behalf of user.

So far, we have seen [link]
  • Creating SPFx solution by mapping necessary permissions to the package-solution.json file. 
  • Tuning the code, to get the access code for Microsoft Graph resources.

Here, by end of this reading, you will get to know how to use the token on Azure service to get access to SharePoint data.


Deploy & Approve Permissions:


Open the created SPFx solution and deploy the solution, before even testing the code on workbench. As the component requires permissions for accessing the data on SharePoint, the permissions requested should be approved before accessing. Once the component is deployed, the required permissions will be listed for approval under admin portal’s API management section.

In my case, the admin portal URL for approving necessary permissions will be
https://nakkeerann-admin.sharepoint.com/_layouts/15/online/AdminHome.aspx#/webApiPermissionManagement