セキュリティ上の理由から、Microsoftは新しいOffice365テナントに対してのみデフォルトでAzureAccess Control(ACS)を無効にしています。(新しいテナントの場合、ACSアプリ専用アクセストークンを使用するアプリはデフォルトで無効になっています。)
これにより、ACSアプリのみのアプローチを使用して、サイトコレクションのみのアクセス許可を処理する新しいカタログが作成されるのを防ぐことができます。この場合、「トークンタイプは許可されていません」というSharePointOnline認証の問題が発生します。
この機能を有効にするには、Windows PowerShellを使用してSharePointに接続し、
Set-SPOTenant -DisableCustomAppAuthentication $falseを実行する必要があります。
- SharePoint オンライン管理シェルの使用を開始する方法についてはこちらをご覧ください。
- Windows PowerShell資格情報要求ダイアログボックスが表示されたら、SharePoint管理者アカウントのログイン/パスワードを入力します。
- コマンドに余分なスペースを含めないでください。
誤った入力例:Set-SPOTenant - DisableCustomAppAuthentication $ false
正しい入力例: Set-SPOTenant -DisableCustomAppAuthentication $false
PowerShellで次の手順を実行します。
1.WindowsPowerShellを管理者として実行します。
2.次のコマンドを実行してPowerShellモジュールのバージョン(少なくとも16.0.20717.12000)を確認します。
Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version
! |
SharePoint Online管理シェルモジュールがない場合は、次のコマンドを実行してインストールしてください。Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Force |
バージョンが16.0.20717.12000以降でない場合は、次のコマンドを実行して最新のモジュールに更新してください。 Update-Module -Name Microsoft.Online.SharePoint.PowerShell -Force |
3. 次のコマンドを実行します。
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
SharePoint 組織名を指定し、
管理者のアカウントでサインインします。
正常に完了した場合、以下のように表示されます。