PnP Framework assign Permission to the SharePoint Using PowerCell

Описание к видео PnP Framework assign Permission to the SharePoint Using PowerCell

Hello everyone! I hope this video has helped solve your questions and issues. This video is shared because a solution has been found for the question/problem. I create videos for questions that have solutions. If you have any other issues, feel free to reach out to me on Instagram:   / ky.emrah  

Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!PnP Framework assign Permission to the SharePoint Using PowerCell

We have assign the App to the selected SharePoint Site by using PnP PowerShell and now pnp removed that support. Is there any other way we can assign permission to a particular user to access the selected SharePoint site? We have referred to the link below to assign permission using Powercell.
https://medium.com/@sanghuynh_73086/h...)
https://medium.com/@sanghuynh_73086/h...)
We are fetching the client's SharePoint documents or files using the Graph API. To do this, we have followed these steps to retrieve documents from SharePoint:
Step 1:
Open PowerShell (recommended to use version = 7.x to run code) in local.




Step 2:
If we haven’t PnP PowerShell locally, we are use the following command to install it:
Install PnP PowerShell in local PowerShell:

Install-Module PnP.PowerShell -Scope CurrentUser
Install-Module SharePointPnPPowerShellOnline -Scope CurrentUser

Install PnP PowerShell in local PowerShell:

Install-Module PnP.PowerShell -Scope CurrentUser
Install-Module SharePointPnPPowerShellOnline -Scope CurrentUser

Step 3:
Connect Sharepoint Site Online:
Connect Sharepoint Online:

$devAsiaP = "https://mydomain.sharepoint.com/sites..."
Connect-PnPOnline -Url $devAsiaP

Connect Sharepoint Online:

$devAsiaP = "https://mydomain.sharepoint.com/sites..."
Connect-PnPOnline -Url $devAsiaP

Step 4:
Verify connection:
Verify connection:

Get-PnPSite

Verify connection:

Get-PnPSite

Step 5:
Grant permission (Permissions Write) for the selected site.
Grant permission for selected site:

Grant-PnPAzureADAppSitePermission -AppId "{client_id}" -DisplayName "{app_name}" -Permissions Write -Site https://mydomain.sharepoint.com/sites...

Grant permission for selected site:

Grant-PnPAzureADAppSitePermission -AppId "{client_id}" -DisplayName "{app_name}" -Permissions Write -Site https://mydomain.sharepoint.com/sites...

Step 6:
Granted permission successfully:



After this step, the app has permission to control the selected Sharepoint Site.
Now, the problem is PnP doesn't provide to assign the permission(below-mentioned steps). and we are looking into an alternative solution.


Tags: .net,azure,sharepoint,microsoft-graph-api,sharepoint-onlineSource of the question:
https://stackoverflow.com/questions/7...

Question and source license information:
https://meta.stackexchange.com/help/l...
https://stackoverflow.com/

Комментарии

Информация по комментариям в разработке