Settings or services required to complete this request are not currently available.

I received the error “Settings or services required to complete this request are not currently available. Try this operation again later. If the problem persists, contact your administrator.” when trying to configure the App URL’s after a greenfield installation of SharePoint 2019 but this can also occur on SharePoint 2013/2016.

There are a few possible solutions for this error where a reboot of the SharePoint servers is the easiest and quickest.

Verify the below SharePoint services and restart these if started or start these if the above doesn’t resolve the issue.

– Managed Metadata Service Application
– App Management Service Application
– Subscription Service Application

You can restart these with PowerShell. First run the following command in the SharePoint 201X Management Shell

get-spserviceinstance

This will list all services available and their current status. Note the ID and run the following command with the ID of the service:

stop-spserviceinstance “03f17c9b-4f40-45c4-9c7d-4dc9c911d873”
start-spserviceinstance “03f17c9b-4f40-45c4-9c7d-4dc9c911d873”

Grant the service account of the application pool permissions for the App Management and the Subscription Settings Service Application if the above doesn’t resolve the issue by following the below steps:

1. Select the App Management Service Application
2. Click on Permissions and add the application pools service account with full control
3. Select the Subscription Settings Service Application
4. Click on Permissions and add the application pools service account with full control
5. Go back to Apps and verify if you don’t receive the error again.

Collect Office 365, Exchange Online and SharePoint Online data with PowerShell

I’ve created a tool to collect data from Office 365 last year. I decided to create a new one which should be easier to use, easier to expand including the installation of the different required modules. The tool has been created with PowerShell using a WPF user interface. The data collection is being executed in a runspace which makes the GUI responsive during the collection. This tool is just a start to collect Office 365, Exchange Online and SharePoint Online data with PowerShell where I will expand it based on customer requirements. It is possible to create certain checks to for example only list webs with unique permissions or show lists with more then an x number of items.

Please let me know which information you would like to collect and I’ll add it to the tool.
You can follow and download the Collect Office 365, Exchange Online and SharePoint Online data with PowerShell tool at GitHub: https://github.com/peetersm12/Office365Information.

This tool will retrieve the information you would like to get based on the authorization you have. It will collect but is not limited to the following:

Office 365 Exchange Online SharePoint Online
Azure Active Directory Users Exchange Online Mailboxes SharePoint Online Site Collections
Azure Active Directory Groups Exchange Online Groups SharePoint Online Webs
Azure Active Directory Guests Exchange Online Devices SharePoint Online Content Types
Azure Active Directory Contacts Exchange Online Contacts SharePoint Online Lists
Azure Active Directory Deleted Users Exchange Online Archives SharePoint Online Features
Office 365 Domain information Exchange Online Public Folders SharePoint Online Permissions
Office 365 Subscriptions Exchange Online Retention Policies
Office 365 Roles
Office 365 Teams

image

[How to] Collect Office 365, Exchange Online and SharePoint Online data with PowerShell

First copy all files and folders from the GitHub repository at https://github.com/peetersm12/Office365Information.
I copied the files and folders to a clean Windows 10 image as to test and run the tool for the first time.
It’s a tool with a lot of pre-requisites which may impact the usability of the tool.

image

Run “Office365-Information.ps1” and you will automatically be asked to run as administrator if you ran this as a normal user.
Please note that you may need to change the execution policy.

image

The GUI has started with a PowerShell window in the background.
First click on “Check Pre-requisites” to verify if you are able to use the script.

image

I’m missing a bunch of modules as this is a clean Windows 10 machine.
Next click on “Install/Update Pre-requisites” to download and install the correct modules.
This may break if you have installed very old versions of some modules. Download and update these modules manually should it fail for any reason.
The GUI may freeze during the installation as it’s downloading the .msi from Microsoft.

image

You will need to accept the installation from the PSGallery and Nuget provider a few times which can be done using the PowerShell window in the background.
Continue accepting all questions (take a look at the script to verify what it is installing)
Go back to the GUI to verify the progress

image

Please restart the script and verify pre-requisites again

image

The Connect and Run buttons have become available if all pre-requisites are met.
Please click on “Connect” to enable the checkboxes as it will only enable the checkboxes which you have permissions to.
It will try to connect to the Office 365 tenant, Exchange Online and SharePoint Online which will enable the checkboxes if passed.

image

OK

image

It will list in green if the connection was successful and enable the checkboxes.
In my first test I have selected all Azure Active Directory checkboxes.

The script will first collect all the requested data and store the information in an .XML file
Next it will create an .HTML file based on the information available in the .XML file.
This means you will only see the sections in the .HTML file of the data you have selected.

image

You can scroll to the log if an error should have occurred.
The .HTML file should have opened automatically but if not it’s located in the log folder.

image

A responsive .HTML file has been created with only the requested sections available.

image

The Menu also only shows the sections you requested.
It’s a one-page site where the menu navigates you to the selected section in the .HTML file.
You can view the information at the end of the blog but for my second test I’m going to select everything and run it again.
Please note that you can collect information from just one SharePoint Online Site Collection or collect information from all Site Collections in your tenant.
It may take a while if you have a large tenant!

image

The HTML file should again be opened automatically which may make the GUI unresponsive.

image

The different outputs are listed below.

Report

I have copied a few sections from the .HTML file below.
The different tables can be copied to Excel from the .HTML file if you want to sort between the data as I currently haven’t added the functionality to create an .XLSX file directly.

image

image

image

image

image

image

image

image

image

image

image

image

Generate a new secure password with PowerShell

The PowerShell Gallery is a perfect solution to store your own scripts which you use on a regular basis where other people can use them to. In this case I added my script to generate a new secure password with PowerShell where you only need to specify the length required. There are a lot of times where you need to create a new password for example the AD recovery password, SharePoint farm passphrase or just for a user account. The password will have uppercase, lowercase and special characters.

The script can be found at  https://www.powershellgallery.com/packages/New-SecurePassword.
I always recommend reading the code first as this is a script from the internet which can be found after clicking on “Show” at “FileList”

image

You can install the script using the below command

Install-Script -Name New-SecurePassword

image

Press Y if you want to install the script from the PSGallery where you can then just enter the following command to generate a new secure password with PowerShell.

New-SecurePassword.ps1 -Length 16

image

The password is readable using Write-Host but also copied directly to the clipboard.