Set-PnpTenantSite bug? 'Field or property "AuthContextStrength" does not exist.' #976
Replies: 4 comments 1 reply
-
I am getting a similar error when I am trying to update OneDrive site collections to set the ConditionalAccessPolicy to BlockAccess. Example code: Connect-SPOService -url https://tenant-admin.sharepoint.com foreach($od4B in Get-SPOSite -Template "SPSPERS" -Limit All -IncludePersonalSite $True) When I execute this I get the following error: Set-SPOSite : Field or property "AuthContextStrength" does not exist.
|
Beta Was this translation helpful? Give feedback.
-
Microsoft confirmed this is a bug. I have not yet had time to test the work around they suggest. I quote their mail: We have checked your issue with our internal team and they updated that this is a known issue globally and they are proactively working on it to get it resolved however there is no specific ETA for it but will be fixed soon. However they have shared workaround for this issue as referred below. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Connect-PnPOnline -Url [https://%3ctenant%3e.sharepoint.com]https://.sharepoint.com Setting up PnP: For customers who are trying to use Set-SPOSite to configure AuthenticationContextName (public preview feature), they cannot set it via PowerShell. The workaround is use sensitivity label: |
Beta Was this translation helpful? Give feedback.
-
This is my reply to Microsoft, including a solution (workaround) that worked for me, though if you try the same, be carefull deleting modules - check if your other scripts still work (I had to revert the changes I made myself). " However, I found the solution! The cause of the problem was that the Set-SPOsite command with the same properties is available in the Powershell module Microsoft.Online.SharePoint.Powershell and the Powershell module SharePointPnPPowerShellOnline I used the Microsoft.Online.SharePoint.Powershell module when I got the error I reported. After removing that module and installing the old Powershell module SharePointPnPPowerShellOnline the command executed successfully. This old module comes with a warning that it wil be archived soon and my scripts are already updated to use the modern PnP.Powershell and/or Microsoft.Online.SharePoint.Powershell modules, edit I removed the Microsoft.Online.SharePoint.Powershell module, though I could propably just have explicitly refered the commands to the SharePointPnPPowerShellOnline module in stead |
Beta Was this translation helpful? Give feedback.
-
Update from the technical lead @ Microsoft: I would request you to please wait until this weekend and it should be resolved for your Tenant also. |
Beta Was this translation helpful? Give feedback.
-
Hello,
PnP.Powershell 1.7.0
Earlier today I tried to update the ConditionalAccessPolicy of a SPO teamsite to use AuthenticationContext with the command Set-SPOSite -Identity site url -ConditionalAccessPolicy AuthenticationContext -AuthenticationContextName "name" from the SharePointOnlinePowershell module.
There I got the error: Set-SPOSite : Field or property "AuthContextStrength" does not exist.
Alternatively tried again with the command Set-PnpTenantSite -Identity "site url" -ConditionalAccessPolicy AuthenticationContext -Title "name"
(as I did not find the '-AuthenticationContextName' parameter like in the SharePointOnlinePowershell module, '-Title' is most likely wrong, but)
There I got the same error: Set-PnpTenantSite : Field or property "AuthContextStrength" does not exist.
Powershell did suggest the parameters "-ConditionalAccessPolicy" and the following "AuthenticationContext", but it seems it's not documented? https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/set-pnptenantsite?view=sharepoint-ps
Is this some 'leftover' from an old version of the PnP.Powershell module of is 1.7.0 incomplete in some way?
Beta Was this translation helpful? Give feedback.
All reactions