SOLVED

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

%3CLINGO-SUB%20id%3D%22lingo-sub-284689%22%20slang%3D%22en-US%22%3Ehow%20to%20display%20url%20and%20conditional%20access%20policy%20for%20all%20site%20collections%20in%20a%20tenant.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-284689%22%20slang%3D%22en-US%22%3E%3CP%3Ehow%20to%20display%20url%20and%20conditional%20access%20policy%20for%20all%20site%20collections%20in%20a%20tenant.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-284689%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-285493%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20display%20url%20and%20conditional%20access%20policy%20for%20all%20site%20collections%20in%20a%20tenant.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-285493%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20just%20as%20easily%20add%20the%20-Detailed%20switch...%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGet-SPOSite%20%7C%20%25%20%7B%20Get-SPOSite%20-Detailed%20-Identity%20%24_.URL%20%7C%20select%20Url%2CConditional*%20%7D%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-285253%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20display%20url%20and%20conditional%20access%20policy%20for%20all%20site%20collections%20in%20a%20tenant.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-285253%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20is%20showing%20full%20access%20for%20all%20site%20collections%20which%20is%20not%20correct.%20I%20have%20tested%20individually%20for%20a%20site%20collection%20with%20the%20following%20line%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EGet-SPOSite%20-Identity%26nbsp%3B%3CSITE%20collection%3D%22%22%20link%3D%22%22%3E%20-Detailed%20%7C%20Fl%3C%2FSITE%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ewhich%20displays%20AllowLimitedAccess%20which%20i%20have%20applied%20before%26nbsp%3B%20specifically%20for%20the%20site%3A%3C%2FP%3E%3CP%3ESet-SPOSite%20-Identity%20%3CNAME%20of%3D%22%22%20site%3D%22%22%20collection%3D%22%22%20or%3D%22%22%20onedrive%3D%22%22%20account%3D%22%22%3E%20-ConditionalAccessPolicy%20AllowLimitedAccess%3C%2FNAME%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-284731%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20display%20url%20and%20conditional%20access%20policy%20for%20all%20site%20collections%20in%20a%20tenant.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-284731%22%20slang%3D%22en-US%22%3E%3CP%3EIt's%20a%20single%20line%20of%20code%20in%20PowerShell%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGet-SPOSite%20%7C%20ft%20Url%2CConditionalAccessPolicy%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1185333%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20display%20url%20and%20conditional%20access%20policy%20for%20all%20site%20collections%20in%20a%20tenant.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1185333%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3BHello%20Vasil%2C%3CBR%20%2F%3E%3CBR%20%2F%3EDo%20you%20have%20an%20idea%20how%20to%20convert%20the%20command%20to%20display%20the%20conditional%20access%20policy%20for%20personal%20onedrive%20for%20business%20site%20%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Regular Contributor

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

4 Replies
Highlighted

It's a single line of code in PowerShell:

 

Get-SPOSite | ft Url,ConditionalAccessPolicy

Highlighted

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

Highlighted
Solution

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

 

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

Highlighted

@Vasil Michev Hello Vasil,

Do you have an idea how to convert the command to display the conditional access policy for personal onedrive for business site ?