Skip to content

Mohamed Ashiq Faleel

Its time to think about Microsoft 365

  • Home
  • Speaking
  • Videos
  • About
  • Contact

Tag: APImetadata

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

Search

Archives

  • January 2021 (1)
  • 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)

Tags

Active Directory AD Adaptive Card adaptive card response in sharepoint adaptive card to multiple teams users Admin AD User APImetadata ApplicationProxy assign license to guest users Automation AzureAD Azure Automation AzureAutomationRunbook AzureLogicApps Backup batch Batching CRUD CustomTheme DataGateway EmailtoPDF guest account in office 365 How to add a component to canvas apps how to assign license to a guest account How to deploy a PCF component HTTP Request IncomingWebhook Integration JSON ListViewFormatting Microsoft365 Micrsoft365 modernsharepointheme moderntheme MSFlow MSGraph MSTeams o365 Office365 On-premise OneDrive operatingsystemazurewebsite osazureappserviceplan osversionazurewebsite Outlook OutlookEmailtoPDF PCF component sample in Power apps PDFConversion Permissions PostMan power PowerApp Owner PowerApps powerau Power Automate PowerAutomate PowerPlatform PowerShell RestAPI REST API 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

RSS Feed RSS - Posts

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.
Cancel
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.
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: