Inventory of al SPOnline sites without access to SP Administrator - sharepoint-online

I am the SPOnline Developer for my company. I do not have access to SP Admin console. I have been requested to produce a set of all SP sites and subsides, but I don't believe there is anyway to do this without being an administrator. I believe I could get this info if using PowerShell SPOnline if I had access to the Administrator, or someone with Admin privileges
at my company could do this.
Anyway to do this without admin privileges?

I would suggest that you download and install the PnP PowerShell. It is wrapper on the OOTB SharePoint powershell but with much easier commandlets and ease of use.
After you download and install the PnP PowerShell, you can run the below commands:
Connect-PnPOnline -Url "<your-site-url>"
Get-PnPSiteSearchQueryResults -Query "(contentclass:'STS_Site') (contentclass:'STS_Web')" -All
After you run the command, Connect-PnPOnline -Url "<your-site-url>", it will open a window asking for credentials. If you provide your credentials, it will work in that context. If you provide admin credentials, it will work in admin context.
Get-PnPSiteSearchQueryResults submits a search query which is the fastest and most efficient way to get list of all the sites and subsites.
Do note, this will give the results of all the sites and subsites to which only you have access. If you run in the context of admin, then, if and only if the admin is added to that particular site will he have access to it.
References -
Dowload this file - SharePointPnPPowerShellOnline.msi for SharePoint online.
Download links (get the latest Nov 2017 or higher) - PnP-PowerShell
Documentation - Get-PnPSiteSearchQueryResults

Related

Connecting Azure AD mobilePhone attribute to SharePoint Online/Delve

I am running into an issue with having the user data for the mobilePhone attribute update and show up for our users' contact cards which run on the SPO/Delve platform. Does anyone know of a way to have the data sync?
To update Azure AD mobile phone attribute to SharePoint online, try making use of below steps:
Make sure to have the below modules installed before running the
PowerShell script
Azure Active Directory (AD) Module
SharePoint Online Module
MS Online Services Sign-in Assistant
Office365 CSOM package
The user must be a global admin on the SharePoint User Profile Application as well as a Service Admin on the Azure tenant.
To connect to PowerShell, make sure the user account must not be configured to MFA.
To get all users, make use of below query,
$AzureADUsers = Get-MSolUser -All
To overwrite existing values, make use of below query,
$overwriteExistingSPOUPAValue = "True"
To know how to do it in detail, please find below reference by Raymond Tishenko
Sync Mobile Phone from Azure Active Directory to SharePoint Online using PowerShell (tishenko.com).
After executing the script, you can see that values are successfully copied from Azure Active Directory to SharePoint.

Access required error while Saving SharePoint site as template

We are getting
"Sorry, you don't have access."
error while trying to save a SharePoint site as template in Microsoft Office 365.
We tried setting "Allow users to run custom script on personal site" and "Allow users to run custom script on self-service created sites" options from SharePoint Online Admin Center as mentioned in the article: https://www.sharepointdiary.com/2017/06/fix-sorry-you-dont-have-access-error-on-save-site-as-template.html
Also we waited for more than 24 hours now to take the effect. But we are still getting the same error.
Is there anything else we need to do?
Thank you!
You could try to run the powershell command to allow custom script on this site:
Set-SPOSite https://tenant.sharepoint.com/sites/yoursite -DenyAddAndCustomizePages 0

Style Library has permission issues SharePoint Online

I am site administrator but when I am uploading or creating something under style library, it is giving error permission denied. The permission on library is inherited from site while I am also in owner group. What can be the reason?
#Ali Murtaza,
This should be caused by NoScript setting of Modern Sites. Please try below cmdlets to fix it:
Connect-SPOService -Url https://<tenantname>-admin.sharepoint.com
Set-SPOSite -Identity https://<SiteUrl> -DenyAddAndCustomizePages 0
more about SharePoint Online Management shell here and download the SharePoint Online Management Shell here.
BR

‎Access Denied, Due to organizational policies, you can't access this resource from this untrusted device

I can't view my SharePoint page and SharePoint admin center. I think I was changing some policies at sharepoint admin center, but I can't remember which one I changed. Other admin centers like OneDrive opens without any issue. Even as a admin I can't open SharePoint Admin Center. It says Access Denied, Due to organizational policies, you can't access this resource from this untrusted device. I've cleared my browser's cache and switched different browser but nothing works.
After contacting Microsoft support and no response from them, I've tried solving this on my own. Here is how I solved it. Install the SharePoint Powershell from here
After installing run these steps on SharePoint Powershell(Admin) to remove access blocks,
Connect-SPOService -Url https://contoso-admin.sharepoint.com
Set-SPOTenant -IPAddressEnforcement 1
Set-SPOTenant -IPAddressAllowList (Your current IP address),
after running these command you will be able to access sharepoint without any issue. Now open SharePoint Admin center and Policies--> Access Control--> Unmanaged Devices and select Allow full access and save.
Or instead Go in Azure AD if you have And into security option check for conditional Access policies if there is any check if that policy is blocking your access to that website.

Access Denied when activating Web application Features in SharePoint 2007

I got the folloiwng exception while activating a web application feature using Stsadm:
Access denied! Only SRP admin can remove property or section.
I have no ideas what a SRP admin is. I'm also at a loss to explain what kind of access does it need. The account I'm log into the box has the maximum access possible, and I would assume that stsadm runs all its commands as the super user. Googling didn't reveal much either.
Any help would be appreciated. TIA.
Taken from here:
The account that you use to run, must be granted Personalization rights in Shared Services Administration for the Default SSP.
Go to Central Administration
Click on SSP-Public
Click on Personalization services permissions
Add the account and grant Manage user profiles
What feature are you trying to activate (if it's not a custom feature of course)? What is corresponding application pool identity? Are you farm administrator? If not, try to add yourself to farm admins. Also be sure you do "Run as administrator" when launching cmd for stsadm. If all this will not help, try to add your application pool identity to farm administrators.

Resources