Microsoft tüm ürün ve hizmetler genelinde güvenlik duruşunu geliştirdikçe, API işlevselliğinde daha önce API'leri kullanarak Sınıf Not Defterleri ve Sınıf Ekipleri sağlamak için yalnızca uygulama izinlerine güvenen müşterileri etkileyebilecek değişiklikler yapılmıştır.
Not: Çoğu durumda, Microsoft 365 ile Öğrenci Bilgileri veya Yönetim Sistemlerinden kullanıcı ve liste verilerini eşitleme sürecini otomatikleştirmeye yardımcı olan ücretsiz bir hizmet olan School Data Sync'i(SDS) kullanmanızı öneririz. SDS eğitim kuruluşunuzu, kullanıcılarınızı, sınıflarınızı ve rollerinizi yönetmenize, verilerinizi Microsoft Entra ID ve Microsoft 365 ile eşitlemenize yardımcı olur; böylece Microsoft Teams, Eğitim için Intune, Exchange Online, SharePoint Online, OneNote Sınıf not defterlerini kullanabilir ve Çoklu Oturum Açma ile üçüncü taraf uygulamaları etkinleştirebilirsiniz entegrasyon.
Desteklenen yöntemleri izleyerek PowerShell ve Microsoft Graph kullanarak sınıfları ve not defterlerini uygun ölçekte sağlamaya devam edebilirsiniz. Bu makalede adımlar özetlenmiştir ve ilgili belgelere bağlantılar sağlanmaktadır.
Önemli: Sınıfların ölçeğinde sağlama konusunda üçüncü taraf bir iş ortağıyla çalışıyorsanız, kendi kendinize adım atmadan önce lütfen bu makaleyi onlarla paylaşın.
Yeni sınıflar sağlama
Seçenek 1 (önerilen): Teams PowerShell'i kullanma
Uyarı: 21 Ağustos 2025'den önce, bu belgelerin gerekli güncelleştirmeden önce Teams PowerShell aracılığıyla sağlanması önerilen önceki bir sürümü yapılmıştı. Bu güncelleştirmeler artık tamamlandı ve şu anda bu yaklaşımla devam edebilirsiniz. Anlayışınız için teşekkürler.
Teams PowerShell kullanarak yeni sınıflar sağlamak kolaydır. Bu, sınıflar ve not defterleri için gerekli tüm ayarları içerir. Aşağıdaki betikte istenen görünen adı özelleştirin ve yönetici olarak çalıştırın.
Örnek betik
# Using the Teams PowerShell SDK
Install-Module -MicrosoftTeams -Force -AllowClobber
New-Team -DisplayName 'Test Class 20251208.4' -Template 'EDU_Class'
|
Seçenek 2: Microsoft Graph PowerShell'i kullanma
Teams PowerShell'e erişiminiz yoksa, Microsoft Graph'ı kullanarak sağlama sınıflarını uygun ölçekte keşfetmek isteyebilirsiniz. Aşağıdaki betiğin en üstündeki parametreleri uygun şekilde düzenleyin ve ardından sınıflar ve not defterlerini uygun ölçekte sağlamak için betiği yönetici olarak çalıştırın:
Örnek betik
# Using the MS Graph API
Install-Module Microsoft.Graph -AllowClobber -Force
# PARAMETERS
$Name = "Test Class 20251208.3"
$Description = "A Test Class"
$Mail = $Name -replace '[^a-zA-Z0-9\s]|[ ]', '' # Replace this mail alias with a preferred generation method
$OwnerId = "000-000-00000-000000-000" # Replace this with the Owner's GUID
# ------------
# Create a new M365 Group
$CreateGroupBody = @"
{
"description": "$Name",
"displayName": "$Description",
"groupTypes": [
"Unified"
],
"mailEnabled": false,
"mailNickname": "$Mail",
"securityEnabled": false,
"members@odata.bind": [
"https://graph.microsoft.com/v1.0/users/$OwnerId"
],
"owners@odata.bind": [
"https://graph.microsoft.com/v1.0/users/$OwnerId"
],
"visibility": "HiddenMembership",
"creationOptions": [
"ExchangeProvisioningFlags:461",
"classAssignments"
],
"extension_fe2174665583431c953114ff7268b7b3_Education_ObjectType": "Section",
"resourceBehaviorOptions": [
"appRoleForSite:22d27567-b3f0-4dc2-9ec2-46ed368ba538:fullcontrol",
"appRoleForSite:c9a559d2-7aab-4f13-a6ed-e7e9c52aec87:fullcontrol",
"appRoleForSite:13291f5a-59ac-4c59-b0fa-d1632e8f3292:fullcontrol",
"appRoleForSite:2d4d3d8e-2be3-4bef-9f87-7875a61c29de:fullcontrol",
"appRoleForSite:8f348934-64be-4bb2-bc16-c54c96789f43:fullcontrol"
]
}
"@
$NewGroup = Invoke-MgGraphRequest -uri 'https://graph.microsoft.com/v1.0/groups/' -Body $CreateGroupBody -Method POST -ContentType "application/json"
# Create Teams Class Team from group
$CreateTeamBody = @{
"template@odata.bind" = "https://graph.microsoft.com/v1.0/teamsTemplates('educationClass')"
"group@odata.bind" = "https://graph.microsoft.com/v1.0/groups('$($NewGroup.Id)')"
}
New-MgTeam -BodyParameter $CreateTeamBody
|
Sorun giderme: Mevcut sınıf sitelerine izin verme
Not: Bu yaklaşım, betiği çalıştıran kişinin burada açıklandığı gibi bir site yöneticisi olmasını da gerektirir. Aşağıdaki betik, şu anda oturum açmış olan kullanıcıyı sorun giderme gerektiren sitelere site yöneticisi olarak ekleme adımını içerir.
Önceden sınıflar sağladıysanız ve Sınıf Not Defteri veya Teams Atamalarıyla ilgili hataları veya izin sorunlarını gözlemliyorsanız, rawGroups parametresini etkilenen sınıfların groupID'leriyle değiştirerek aşağıdaki betiği kullanarak sınıflarınızın site izinlerini güncelleştirebilirsiniz:
Örnek betik
#You will need to connect to SharePoint, Exchange Online, and Graph with the following -Scopes Sites.FullControl.All, as well as collect the groupIDs of Class Teams affected
$rawGroups =@("b0a5905d-09ae-4605-8e12-94da93ecbe92","e0eec729-24ef-451e-b079-56d0baf4dfc9")
# Convert to array of objects with .groupid
$groups = $rawGroups | ForEach-Object { Get-UnifiedGroup -Identity $_ }
$step = 0
#get the currently logged in user's account to add as a site admin
$CUA = (get-mgcontext).account
foreach ($group in $groups) {
$step = $step + 1
Set-SPOUser -Site $group.SharePointSiteUrl -LoginName $CUA -IsSiteCollectionAdmin $true
Write-Host "SiteCollectionAdmin added on $step of $($Groups.Count) Class Sites"
}
#Pause for 5 minutes before tiggering the General Folder creation
Write-Host "Pausing for 5 Minutes before adding perms to allow SiteCollectionAdmin to propagate"
Start-Sleep -Seconds 300
Write-Host "Working on $($Groups.Count) Classes"
foreach ($group in $groups) {
#$step = $step + 1
$Site = Get-MgGroupSite -GroupId $group.ExternalDirectoryObjectId -SiteId "root"
$SiteId = $Site.Id
Write-Host "Processing permissions on $step of $($Groups.Count) Classes"
# These are the AppIds for common Microsoft EDU Apps
$AppIds = @{
"8f348934-64be-4bb2-bc16-c54c96789f43"="EDU Assignments";
"22d27567-b3f0-4dc2-9ec2-46ed368ba538"="Reading Assignments";
"2d4d3d8e-2be3-4bef-9f87-7875a61c29de"="OneNote";
"c9a559d2-7aab-4f13-a6ed-e7e9c52aec87"="Microsoft Forms";
"13291f5a-59ac-4c59-b0fa-d1632e8f3292"="EDU OneNote";
}
# Apply the permissions to the group site
$AppIds.Keys | %{
$AppId = $_
$Name = $AppIds[$_]
$Body = @"
{
"roles": ["fullcontrol"],
"grantedToIdentities": [{
"application": {
"id": "$AppId",
"displayName": "$Name"
}
}]
}
"@
Invoke-MgGraphRequest -Method POST -Uri "https://graph.microsoft.com/v1.0/sites/$SiteId/permissions" -Body $Body -ContentType "application/json"
}
}
Write-Host "Processed $($Groups.Count) Classes, removing sitecollectionadmin"
$step = 0
foreach ($group in $groups) {
$step = $step + 1
Set-SPOUser -Site $group.SharePointSiteUrl -LoginName $CUA -IsSiteCollectionAdmin $false
Write-Host "SiteCollectionAdmin removed on $step of $($Groups.Count) Class Sites"
}
|