Skip to content

Mohamed Ashiq Faleel

Its time to think about Microsoft 365

  • Home
  • Speaking
  • Videos
  • About
  • Contact

Tag: SharePointRestAPIEndpoints

SharePoint Online & MS Graph API Metadata service document

I have recently received a request from a customer to break the inherited permissions of a SharePoint document library folder, as of now there is no Power Automate action to break the permission of a folder but with the action Send an HTTP request to SharePoint you can call any SP REST API endpoint. Then I started exploring the Rest API endpoint to break the permission, have found the API endpoint

_api/lists/getbytitle(‘Documents’)/items(itemID)/breakroleinheritance()

I was trying to understand the method breakroleinheritance() in the endpoint and its parameters. This method passes two Boolean parameters, copyRoleAssignments and clearSubScopes.

  1. copyRoleAssignments parameter specifies whether to maintain the current role assignments already inherited from the parent site collection or Web site or List/Library,
  2. clearSubScopes parameter specifies whether to clear unique permissions of child objects so that they will subsequently inherit permissions from the parent Web site or list

So how to know that the method breakroleinheritance() accepts two parameters

  1. Documentation from Microsoft
  2. API Metadata document

The metadata document ($metadata) is published at the service root for SharePoint & Graph API (v1.0 & beta versions). It describes about endpoints, methods, parameters, properties, associations etc

SharePoint Online API Metadata:

To access the metadata document for SharePoint REST service, hit the following URL from the browser after authentication

https://yourdomain.sharepoint.com/sites/sitename/_api/$metadata

The response to the request will be an XML document. If I search on the XML file for breakroleinheritance, I found the following information

It will not give you information about the HTTP method [GET, POST, PUT etc] to use but it will provide you some insights on the API metadata. I understand it is difficult to search the XML document, a big shout out to Sergei Sergeev who has created an excellent project SharePoint REST API Metadata Explorer to handle the difficulty. Find the link below to access the project

https://s-kainet.github.io/sp-rest-explorer

As per the information on the project, the metadata is getting updated daily.

MS Graph API Metadata:

To access the metadata document for MS Graph service, make a GET request in MS Graph Explorer to the following URL based on the versions you would like to get the metadata

Microsoft Graph API v1.0 metadata

https://graph.microsoft.com/v1.0/$metadata

Microsoft Graph API beta metadata

https://graph.microsoft.com/beta/$metadata

The response metadata will be in JSON.

Reference: https://docs.microsoft.com/en-us/graph/traverse-the-graph

Hope this helps someone. Sharing is Caring.

Share this:

  • Twitter
  • Facebook
  • LinkedIn
  • WhatsApp
  • Email
  • Print
  • Reddit
  • Tumblr
  • Pinterest

Like this:

Like Loading...
Mohamed Ashiq Faleel MS Graph, SharePoint Leave a comment July 15, 2020 2 Minutes

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 221 other subscribers
Follow Mohamed Ashiq Faleel on WordPress.com

Archives

  • January 2023 (1)
  • December 2022 (1)
  • June 2022 (1)
  • May 2022 (1)
  • March 2022 (1)
  • February 2022 (1)
  • January 2022 (3)
  • December 2021 (4)
  • November 2021 (1)
  • July 2021 (6)
  • June 2021 (2)
  • May 2021 (4)
  • April 2021 (1)
  • March 2021 (4)
  • February 2021 (2)
  • January 2021 (3)
  • November 2020 (4)
  • October 2020 (1)
  • September 2020 (1)
  • August 2020 (3)
  • July 2020 (3)
  • June 2020 (5)
  • May 2020 (6)
  • April 2020 (1)
  • February 2020 (2)
  • January 2020 (4)
  • December 2019 (4)

Search

Tags

Active Directory AD Adaptive Card Admin AD User APImetadata ApplicationProxy assign license to guest users Automation AzureAD Azure Automation AzureAutomationRunbook AzureLogicApps Backup batch Batching CRUD CustomTheme DataGateway EmailtoPDF how to call microsoft graph in power automate how to call msgraph in flow HTTP Request IncomingWebhook Integration JSON ListViewFormatting Microsoft365 microsoft365group microsoftgraph microsoft graph in power automate microsoftteams Micrsoft365 modernsharepointheme moderntheme MSFlow MSGraph msgraph in flow MSTeams o365 Office365 On-premise OneDrive operatingsystemazurewebsite osazureappserviceplan osversionazurewebsite Outlook OutlookEmailtoPDF PDFConversion Permissions PostMan power PowerApp Owner PowerApps powerau PowerAutomate Power Automate PowerPlatform PowerShell REST API RestAPI Restore runtimestackazureappserviceplan runtimestackazurewebsite Search API Share SharePoint Sharepointheme SharePoint Online SharePointRestAPIEndpoints SharePoint Search Static HTML hosting in SharePoint Online site Static HTML in SharePoint Online Tilesview User Creation

Categories

Translate

Follow Me

  • LinkedIn
  • YouTube
  • Twitter
  • GitHub

    Disclaimer:

    These postings are provided with no warranties, and confers no rights. The content of this site are my own personal opinions and do not represent my employer’s view in anyway. My thoughts and opinions are open to change

    Start a Blog at WordPress.com.
    • Follow Following
      • Mohamed Ashiq Faleel
      • Join 74 other followers
      • Already have a WordPress.com account? Log in now.
      • Mohamed Ashiq Faleel
      • Customize
      • Follow Following
      • Sign up
      • Log in
      • Report this content
      • View site in Reader
      • Manage subscriptions
      • Collapse this bar
     

    Loading Comments...
     

      Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
      To find out more, including how to control cookies, see here: Cookie Policy
      %d bloggers like this: