Forum Discussion

null null's avatar
null null
Iron Contributor
Nov 09, 2018
Solved

how to display url and conditional access policy for all site collections in a tenant.

how to display url and conditional access policy for all site collections in a tenant.

  • You can just as easily add the -Detailed switch...

     

    Get-SPOSite | % { Get-SPOSite -Detailed -Identity $_.URL | select Url,Conditional* }

5 Replies

  • It's a single line of code in PowerShell:

     

    Get-SPOSite | ft Url,ConditionalAccessPolicy

    • null null's avatar
      null null
      Iron Contributor

      It is showing full access for all site collections which is not correct. I have tested individually for a site collection with the following line:

       


      Get-SPOSite -Identity <site collection link> -Detailed | Fl

       

      which displays AllowLimitedAccess which i have applied before  specifically for the site:

      Set-SPOSite -Identity <name of site collection or OneDrive account> -ConditionalAccessPolicy AllowLimitedAccess

      • VasilMichev's avatar
        VasilMichev
        MVP

        You can just as easily add the -Detailed switch...

         

        Get-SPOSite | % { Get-SPOSite -Detailed -Identity $_.URL | select Url,Conditional* }