Work with SharePoint's REST API

Mohammed OUAHI 60 Reputation points
2024-04-11T12:44:27.0033333+00:00

Hi,

To perform actions across all SharePoint sites within my Tenant using Power Automate, The SharePoint HTTP action can interact with SharePoint's REST API to perform operations on a single site only. So To extend this to all sites, I would typically need to work with SharePoint REST API.

To do so: i've registered a new APP, but when I try to set the permissions so that i can apply the full control Right It leads me to to an error message (Sorry it's in French)

Image

i'm using the following WML code:

<AppPermissionRequests AllowAppOnlyPolicy="true">

<AppPermissionRequests Scope="http://sharepoint/content/sitecollection/web"

Right="FullControl"/>

</AppPermissionRequests>

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

Image

Thanks for your help.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,679 questions
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
316 questions
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 31,526 Reputation points Microsoft Vendor
    2024-04-15T02:15:31.07+00:00

    Hi @Mohammed OUAHI,

    For new tenants, apps using an ACS app-only access token is disabled by default. You can change the behavior by running set-spotenant -DisableCustomAppAuthentication $false (needs the latest SharePoint admin PowerShell).

    Then you should check if you are using the right url to register the app only. The url should be like following

    https://contoso.sharepoint.com/sites/sitename/_layouts/15/appregnew.aspx

    https://contoso-admin.sharepoint.com/sites/sitename/_layouts/15/appinv.aspx


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful