0

I want to register an add in in SharePoint online where I can run search queries. I've tried various permission xml's and cannot seem to get it to work.

I've been going here assign the xml... https://{sharepointsite}/_layouts/15/appinv.aspx

My latest try was this...

<AppPermissionRequests AllowAppOnlyPolicy="false">
<AppPermissionRequest Scope="http://sharepoint/search" Right="QueryAsUserIgnoreAppPrincipal" />
<AppPermissionRequest Scope="https://sharepoint/content/tenant" Right="FullControl" />
</AppPermissionRequests>

which results in "Application does not have administrative permissions in tenant"

I've also tried this which doesn't work either...

<AppPermissionRequests AllowAppOnlyPolicy="false">
<AppPermissionRequest Scope="http://sharepoint/search" Right="QueryAsUserIgnoreAppPrincipal" />
</AppPermissionRequests>

and this...

<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="https://sharepoint/content/tenant" Right="FullControl" />
</AppPermissionRequests>

So, my question is - what is the proper permission xml so search queries can be performed.

2 Answers 2

1

I heard about this. It's a long story of permission cooking for app. You can read topic like this - MSDN Archive Link. You need to add the permission XML in the admin site collection. I hope this help you.

<AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" />
1

You need to add Tenancy scope permission.

http://sharepoint/content/tenant

Please refer to following document

https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/add-in-permissions-in-sharepoint#types-of-add-in-permissions-and-permission-scopes

1
  • Would you add the tenancy permission on the admin permissions page xxxx-admin.sharepoint.com/_layouts/15/appinv.aspx like this... <AppPermissionRequests AllowAppOnlyPolicy="true"><AppPermissionRequest Scope="sharepoint/content/tenant" Right="FullControl" /></AppPermissionRequests> And then go to the non-admin site to assign a search permission as well like this? <AppPermissionRequests AllowAppOnlyPolicy="false"><AppPermissionRequest Scope="sharepoint/search" Right="QueryAsUserIgnoreAppPrincipal" /></AppPermissionRequests>
    – N8ALL3N
    Commented Oct 3, 2022 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.