You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
i am trying to run tru a CSV file with libery and rights.
When it comes to the set permissions it fails when running in a foreach loop. But if i run it manuely it works.
The script looks like this:
foreach($Row in $CSVFile)
{
Connect-AzureAD -Credential $Credential
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
i am trying to run tru a CSV file with libery and rights.
When it comes to the set permissions it fails when running in a foreach loop. But if i run it manuely it works.
The script looks like this:
foreach($Row in $CSVFile)
{
Connect-AzureAD -Credential $Credential
Get the ObjectId of your Azure AD group
$GroupId = (Get-AzureADGroup | Where { $_.DisplayName -eq $Row.Securytigroup }).ObjectID
Connect-PnPOnline -Url "$sharepoint/$sharepointsite" –Credentials $Credential
$fix5 = Set-PnPListPermission -Identity $Row.Liberyname -user "c:0t.c|tenant|$GroupId" -AddRole "Må redigere"
}
it gives me this error:
Set-PnPListPermission : Den angivne bruger c:0t.c|tenant|b068d596-9cd2-4ad1-8e0f-c0df819c28b5 blev ikke fundet.
At sharepoint.ps1:69 char:9
Beta Was this translation helpful? Give feedback.
All reactions