Tag: SharePoint (Page 1 of 8)

View in File Explorer now available in Microsoft Edge

As of August 17, 2021 Microsoft has stopped support for the Internet Explorer 11 (IE 11) for Microsoft 365 apps and services. As a result, Microsoft recommends using the OneDrive sync app to sync SharePoint files with your computer, rather than using View in File Explorer feature in IE11.

But In some special cases, still some customers asks to use View in File Explorer feature of Modern SharePoint online.

Good news is, from the Microsoft Edge Stable version 93, you can enable the View in File Explorer capability for SharePoint Online Modern Document Libraries.

For this experience to be visible and work for your users, you will need to enable the Microsoft Edge policy “Configure the View in File Explorer feature for SharePoint pages in Microsoft Edge” and update your SharePoint Online tenant configuration.

Configuration to enable the View in File Explorer with Microsoft Edge

To enable View in File Explorer feature on your SharePoint online tenant, follow steps given at: Configure View in File Explorer with Edge.

After enabling the feature, you can find the View in File Explorer option by navigating to the Document Library > Select the Library View Menu on the right-hand side > Select View In File Explorer.

View in File Explorer feature in SharePoint Online modern experience document library
View in File Explorer in action in SharePoint online document library

Release Timeline for this feature

  • This feature will start rolling out in early October for Targeted release.
  • This feature will begin rolling out in early November and complete by the end of November for standard releases.

While View in File Explorer feature will be available, it is not recommended to use this feature always. Whether you’re using Google Chrome, Microsoft Edge, or another browser, Sync feature is a faster and more reliable method for putting SharePoint files into folders you can see in File Explorer. To learn more, visit SharePoint file sync.

Reference: View SharePoint files with File Explorer in Microsoft Edge

SharePoint Access Token using Postman

There are lots of ways to fetch an update the SharePoint resources.

Today, I am going to provide you a way to access the SharePoint resources using an access token using Postman.

Postman

This is a developer friendly tool for handling REST API from any platform.

If you are new to the SharePoint REST APIs, then you can learn more from Get to know the SharePoint REST service.

Now we have some understanding about Post Man tool & SharePoint Rest API endpoints. Now we’ll start testing the SharePoint REST API with this tool.

Let’s take one simple example to fetch a web title using a SharePoint REST API.

The equivalent syntax to retrieve a website’s title is

https://.sharepoint.com/_api/web?$select=Title

After entering the above URL in the text-box in the URL text-box. We will get the Unauthorized exception on accessing the information.

Unauthorize exception from Postman

SharePoint Online is very much secured and that doesn’t allow anonymous users to access the information for their site. And hence it resulted in an error message response, after sending the request.

To avoid the Unauthorized exception, we have to add some request header values to the API request. Authentication and Authorization of SharePoint Add-Ins gives the overview of authorizing the Add-ins to access SharePoint resources by the APIs.

SharePoint supports three types of authentication policies:

Authentication Policies:

  • User Policy
  • Add-In Policy – We are using this policy to authenticate the external system to access SharePoint
  • User +Add-In Policy

Request Headers:

We require the following information in various requests to authenticate with SharePoint online site.

  • Client Id
  • Client Secret
  • Realm (Tenant Id)
  • Access Token

Authorize Postman to access SharePoint

We need to authorize postman to access SharePoint resources using REST API endpoints.

To do that we will need to pass access token values as a request header.

To get the access-token, we should generate Client Id and Secret information from the site by registering as an App only Add-In in SharePoint site. This is the same as registering an add-in for Provider Hosted Add-In.

I have provided the steps below to get the Tenant Id, Access Token, and data from SharePoint using Postman utility.

Register Add-In

  • Navigate and login to SharePoint online site.
  • Then navigate to the Register Add-In page by entering the URL as

https://<sitename>.SharePoint.com/_layouts/15/appregnew.aspx

  • In the App Information section, click the Generate button next to the Client Id and Client Secret textboxes to generate the respective values.
  • Enter Add-In Title in Title textbox
  • Enter AppDomian as a localhost
  • Enter RedirectUri as a https://localhost
Register an Add-In

Click Create button, which registers the add-in and returns the success message with created information.

Add-In registration successful

Save this information safely, we will need that in the following step.

Grant Permissions to Add-In

Once the Add-In is registered, we need to set the permissions for that add-in to access the SharePoint data. We will set the Read permission level to the web scope so that we will be able to read the web information.

  • Navigate to the SharePoint site
  • Then enter the URL https://<sitename>.sharepoint.com/_layouts/15/appinv.aspx in the browser. This will redirect to the Grant permission page.
  • Enter the Client ID(which we have generated earlier), in the AppId textbox and click the Lookup button. That will populate the value to other text boxes in Title, App Domain, and Redirect Url

Now, enter the below xml in the Permission Request.

<AppPermissionRequests AllowAppOnlyPolicy="true"> <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="Read" /> </AppPermissionRequests>

Set permission to the Add-In

Click Create button. This will redirect to you page, where we have to trust the add-in to read items from website.

Trust Add-In

Note: If we want to access site collection or tenant level, we have to add the XML accordingly

Retrieve the Tenant ID

Once we registered the Client Id and Secret with the permissions, we are ready to access the SharePoint information from external system or tools.

At first, we have to know the Tenant ID. Follow the below steps to obtain that information from the postman. Postman helps to get the tenant Id by requesting the below URL with an Authorization header

  • Launch Postman chrome extension
  • Select the Get Method
  • Enter the below URL in the “Request URL” textbox
    https://<sitename>/sharepoint.com/_vti_bin/client.svc/
  • Configure the below information in the header section to send along with the URL request method = Get
Get Tenant ID from SharePoint Online

We are interested in two values, realm and client_id from the above response.

Generate the Access Token

In response header, we will get WWW-Authenticate as one of the header and that contains the necessary information required for next step. The realm value contains the tenant id for the SharePoint Online site and clientid value contains the resource information (we’ll use it later).

  • After getting the Tenant ID, we have to form a URL with the below format
    https://accounts.accesscontrol.windows.net/<TenantID>/tokens/OAuth/2 for requesting the access token.
  • Apply the below configurations in header
    Method = POST

Headers

Header

Body

After applying the configuration, click Send button. That will returns the response with the Access Token.

Response with access token

Once we are received the access token, its like we got the authorization to access the SharePoint data based on the permission applied in Grant Permission as Add-In section.

We have to pass the access token as “token_type access_token

Access the SharePoint resource

Now we have the access token, So we can now pass this token in Authorization header with the SharePoint REST API to get the information.

  • In Postman tool, add the below URL to retrieve the web title

https://<sitename>.sharepoint.com/_api/web?$select=Title

  • Apply configurations in header
  • Method = POST

Headers

  • After applying the configuration, click the Send button.
  • We will get the response successful as below if the permission XML applied correctly on the appinv page. Otherwise, we will get the access denied error message.
Postman returns the response as per the

Conclusion

The postman utility helps us start the development and test the REST API utility. Using this approach we can update any information of SharePoint which is supported by SharePoint REST API.

Please comment and share this article with your friends and collegues.

Happy SharePointing!!!

courtesy: link

Power Platform – GitHub Connector

The Power Platform is not having a connector for GitHub.

Using this connector, user can create a GitHub repo, create a pull request, merge a pull request and , compare commits, trigger a GitHub actions workflow and much more from Power Apps and Power Automate.

The GitHub connector works perfectly with the GitHub Actions for Power Platform released in preview recently

Read more here

SharePoint Spaces

SharePoint spaces is a web-based, immersive platform, which lets you create and share, secure and extensible mixed reality experiences. 

Building a space is a lot like building a modern site — that is, you create the space and choose options such as structure, background, and theme. Add web parts for your 3D objects, 360° images and videos, 2D images and text, and more. 

You can build one or more SharePoint spaces on a new or existing site. We recommend using communication sites because you have more screen real estate to work with, but it is also possible to build a SharePoint space in a team site. When you create a space, you choose options such as structure and background. Then add web parts for your 3D objects, 360° images, 360° videos, 2D images, and more.

To create a space, you must first activate it at the Site level. Go to Settings / Site Information/ View All site settings / Manage site features to activate the Spaces (preview) feature:

Once this feature is enabled, you can create a space on the same level as you create a page. So Space is NOT a web part but it is a more sort of special type of page.

Manual Steps:

  1. Go to the home page of the site where you want to build a space. If you don’t already have a site you want to use, you can create a new one.
  2. Activate the spaces feature if it is not already activated:
    1. At the top left of the site, select Settings Gear shaped settings button  > Site information, and then select View all site settings.
    2. On the Site settings page, select Manage site features. Scroll down the page to Spaces, and then select Activate.

Using PnP Powershell

Enable-PnPFeature -Identity 1604b101-3328-4405-b7e0-54ce59b9d124 -Scope Web

Once the space feature is activated.

  1. On your site home page, select + New, and then select Space.
  2. Choose the type of space you’d like to create (you can change this later).
  1. Provide your space a Space name (required).
  2. Provide your space a Space description (optional).
  3. Select Create.Space name field

To get an idea about the SharePoint space, you can explore some of the samples here

I hope you liked this blog. Give your valuable feedback & suggestions in the comments section below and share this blog with others.

courtesy:

https://support.microsoft.com/en-us/office/create-a-sharepoint-space-77e0bb2a-625e-40a9-b38e-1ca84db6cf65

« Older posts

© 2023

Theme by Anders NorenUp ↑