Need Assistance to grant an Azure Service Principal permission to a Specific M365 SharePoint Site in our tenant #6713
Replies: 4 comments 3 replies
-
Hi, unfortunately, we are not the maintainers of this PowerShell module. I'm also not sure where to refer you either. @waldekmastykarz, @VesaJuvonen, do you have any idea? |
Beta Was this translation helpful? Give feedback.
-
I just wanted to add other articles I saw recommended using PowerShell 7, so that is what I have, others say that you need to use PowerShell 5.1. So perhaps the syntax is not supported in current/newer powerShell versions. At the end of the day - any assistance is appreciated. |
Beta Was this translation helpful? Give feedback.
-
Sorry, I don't know what's wrong. I suggest you ask the question at https://github.com/sharepoint/sp-dev-docs which is related to SharePoint development all-up and includes Microsoft's engineers. |
Beta Was this translation helpful? Give feedback.
-
Thanks - took your suggestion and opened a new topic, here, SharePoint/sp-dev-docs#10235 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I had originally opened tickets with Microsoft support from Azure & M365 pointed me to this area instead of providing assistance so hope you can help.
We have created an Azure Service Principal and are planning to use the SP to connect to a specific M365 SharePoint site within our tenant.
We have followed the documentation that MS provides, https://learn.microsoft.com/en-us/powershell/module/sharepoint-server/set-spappprincipalpermission?view=sharepoint-server-ps and https://learn.microsoft.com/en-us/answers/questions/2116616/service-principal-access-to-sharepoint-online
The syntax however does not work properly and get errors indicating that that the Syntax is incorrect, not recognizing Get-SPSite, Get AppPrincipalPermission, etc. I have verified that the SPO modules are all installed.
One of the techs had me generate the SP from the SharePoint side, https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azureacs which worked fine. However; once again, trying to connect via the SP provides errors indicating the syntax is not correct.
Please provide any assistance you can in the appropriate syntax via PowerShell to map the SP and SharePoint site regardless if created from SharePoint Online into Azure or starting in Azure and trying to grant permission to SharePoint online site.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions