Share via

API permissions

Rising Flight 6,456 Reputation points
2021-08-18T21:24:46.503+00:00

Hi All

i am new to Azure App Registration i have created a team site by name test1

https://contoso.sharepoint.com/sites/test1

i want to create an app in Azure App registration i want to give full,create,update,read,delete on the api to this team site, not on the complete tenant. Experts guide me how to give the API permission on this team site.

To create an api i will use the below url
https://contoso.sharepoint.com/sites/test1/_layouts/15/appregnew.aspx

Do i need to give permissions using the below url and what permission do i need to give.
https://contoso.sharepoint.com/sites/test1/_layouts/15/appinv.aspx

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments

Answer accepted by question author

RaytheonXie_MSFT 40,496 Reputation points Microsoft External Staff
2021-08-19T01:27:53.56+00:00

Hi @Rising Flight ,
Yes,we need to grant permissions by the url. Please Fill the following code in App's Permission Request XML with full control.

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

Then click create and trust it.


If an Answer is helpful, please click "Accept Answer" and upvote it.
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.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Rising Flight 6,456 Reputation points
    2021-08-19T03:55:03.037+00:00

    To summarize and correct me if i am wrong

    To generate client client which url will work for me.

    https://contoso.sharepoint.com/_layouts/15/appinv.aspx
    or
    https://contoso.sharepoint.com/sites/test1/_layouts/15/appinv.aspx (i believe this will not work)

    To give API permissions on the teams site only(test1 is my teams site)

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

    <AppPermissionRequests AllowAppOnlyPolicy="true">
    <AppPermissionRequest Scope=http://contoso/content/sitecollection/
    Right="FullControl" />
    </AppPermissionRequests>
     
    

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.