新しいテナントにインストールし、初めて新しいコースカタログを作成すると、プロセス中に「Sharepoint で予期しないエラーが発生しました。"Token type is not allowed"」エラーが表示されることがあります。
セキュリティ上の理由から、Microsoft は新規の Office 365 テナントに対して、Azure Access Control (ACS)を既定で無効にしています。
これにより、サイトコレクションの権限のみを取り扱う ACS アプリケーションだけのアプローチを使用した新しいカタログの作成ができなくなります。
この機能を有効にするには、Windows PowerShell を使用して SharePoint に接続し、
Set-SPOTenant -DisableCustomAppAuthentication $false
を実行する必要があります。
PowerShellで以下の手順を実行します。
1.管理者として Windows PowerShell を開始します。
2.以下のコマンドレットで SharePoint PowerShell モジュールのバージョンが 16.0.20717.12000 以上であるか確認します。
SharePoint PowerShell モジュールをインストールしていない場合は、インストールしてください。
Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version
3.モジュールのバージョンが 16.0.20717.12000 かそれ以上の場合は、次のコマンドを実行します。
function Enable-SPDisableCustomAppAuthentication {
Write-Host "Please specify sharepoint organisation name." -ForegroundColor Green
Write-Host "For example if your sharepoint site is https://contoso.sharepoint.com value should be contoso: " -ForegroundColor Green -NoNewline
$orgName = Read-Host
$orgName = $orgName.Trim().Trim("'")
Write-Verbose "Connecting to: https://$orgName-admin.sharepoint.com" -Verbose
Connect-SPOService -Url "https://$orgName-admin.sharepoint.com"
Set-SPOTenant -DisableCustomAppAuthentication $false
}
Enable-SPDisableCustomAppAuthentication
4.SharePoint の組織名を指定し、
管理者アカウントでサインインします。
5.以下の表示になると、処理は正常に完了です。PowerShell を終了します。
SharePoint PowerShell モジュールのインストール
SharePoint PowerShell モジュールがインストールされていない場合は、以下のコマンドを実行しインストールしてください。
Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Force
その後、手順2.に戻ります。
SharePoint PowerShell モジュールの更新
モジュールのバージョンが 16.0.20717.12000 以上でない場合は、最新のモジュールに更新してください。
Update-Module -Name Microsoft.Online.SharePoint.PowerShell -Force
その後、手順2.に戻ります。
以下の点にご注意ください:
SharePoint Online Management Shell の使用については「SharePoint Online 管理シェルを使用して作業を開始する」をご参照ください。
Windows PowerShell の資格情報要求ダイアログボックスが表示されたら、SharePoint 管理者アカウントの ログイン名 と パスワード を入力します。
コマンドには余分なスペースを含めないでください
誤:Set-SPOTenant - DisableCustomAppAuthentication $ false
正:Set-SPOTenant -DisableCustomAppAuthentication $false