身為管理員,您通常會手動將授權指派給使用者。 Power Apps 授權的自動宣告使管理員能夠輕鬆地在 Microsoft 365 系統管理中心內建立原則,就像他們為其他 Microsoft 產品和服務所做的那樣。 設定原則後,組織中需要個人 Power Apps 授權的任何使用者在以下情況下都會自動取得一個授權:
- 如果使用者缺少獨立 Power Apps 授權,且啟動的是需要進階授權的應用程式,則系統會自動向該使用者指派 Power Apps 依使用者授權。
- 若未持有獨立 Power Apps 授權的使用者在受管理環境中啟動應用程式,該使用者會自動獲得每使用者的 Power Apps 授權。
您可以在 Microsoft 365 系統管理中心建立和管理這些自動宣告原則。
注意
美國主權雲 (GCC、GCC-H、DOD) 不支援自動宣告原則。
建立 Power Apps 授權的自動宣告原則
使用下列資訊為 Power Apps 設定自動申領原則。
如需深入了解如何管理 Microsoft 365 系統管理中心的自動宣告原則,請前往管理 Microsoft 365 系統管理中心的自動宣告原則。
誰可以建立和管理自動宣告原則?
若要建立和管理自動宣告原則,您必須具備全域管理員權限。 如需詳細資訊,請前往關於 Microsoft 365 系統管理中心中的管理員角色。
開啟自動請領政策功能
您必須先在 Microsoft 365 系統管理中心打開該功能,才能建立自動宣告原則。
- 前往 Microsoft 365 系統管理中心。
- 在導覽功能表中,選取計費>授權。
- 選取自動宣告原則索引標籤。
- 按一下打開設定按鈕。
打開此功能之後,您可以建立自動宣告原則。
建立 Power Apps 的自動宣告原則
自動宣告原則索引標籤會顯示您所建立的原則。 您可以查看原則名稱、關聯的應用程式、已指派的產品、可用的授權,以及原則的狀態。
若要建立新原則,請完成下列步驟。
- 在 Microsoft 365 系統管理中心,按一下計費>授權。
- 按一下 自動申領原則 索引標籤。
- 按一下新增原則。
- 在命名此自動宣告原則頁面上,輸入原則的名稱,然後按一下下一步。
- 在設定自動宣告應用程式和產品頁面上,選取下拉式清單中的 Power Apps 依使用者方案。 您可以根據每個使用者指派產品授權,或選擇將使用者新增至安全群組選項,然後選擇適當的群組。
- 在 選取應用程式 頁面,選取或清除要隨授權一併包含或排除之應用程式的核取方塊。 按一下 Next。
- 在檢閱並完成頁面上,確認新的原則資訊、進行任何必要的變更,然後按一下建立原則。
自動認領原則預設為啟用
為了簡化管理員的授權管理,在有託管環境的租戶中,自動申請政策不需要管理員手動啟用。 自動申領原則會自動建立。 自 2023 年 12 月起,Microsoft 365 系統管理中心會為具有受控環境的租用戶建立一個適用於 Power Apps 每位使用者授權的自動領取原則,名稱為 Auto-Created Policy for Power Apps。 根據此政策,如果未持有 Power Apps per user 授權的使用者在受管理的環境中啟動應用程式,且您的租用戶中有可用的 Power Apps per user 授權,該使用者就會自動獲得一個 Power Apps per user 授權。
預設情況下,當使用者在受管理環境中開啟 Power Apps 時,此政策會套用。 管理員可以選擇透過 Power Platform 系統管理中心中的設定擴展此原則以涵蓋在標準環境中開啟的 Power Apps。
從 2024 年 2 月開始,擁有新的 Power Apps Premium 授權的租用戶會在 Microsoft 365 系統管理中心自動設定 Power Apps 的自動建立原則。 自動建立的原則可確保任何沒有授權並啟動需要進階授權的 Power Apps 的使用者都會自動從租用戶的可用授權中授予 Power Apps 進階授權。 此程序可讓存取更順暢,並能更簡單地管理授權。 預設情況下,此原則適用於所有環境。
管理員可以更新原則嗎?
可以,管理員可以管理 Microsoft 365 系統管理中心的原則,就像其他自動宣告原則一樣。 管理員可以停用原則,將其刪除,也可以查看已指派授權的使用者報告。
在 Power Platform 管理中心,管理員可以決定該政策是只適用於受管理環境還是所有環境。
- 在 Power Platform 系統管理中心,前往設定,然後按一下自動宣告原則選項。
- 在自動宣告原則窗格中,選取原則是否套用於所有環境,或只套用於受控環境。
支援群組式授權指派
管理員可以設定原則將使用者新增至預定義群組以指派授權,而不是在使用者啟動 Power Apps 時直接向個別使用者指派授權。
建立自動宣告原則時,在設定自動宣告應用程式和產品步驟中 (在為 Power Apps 建立自動宣告原則過程中),管理員可以根據每個使用者指派產品授權,或選擇將使用者新增至安全性群組選項,然後選擇適當的群組。 此選項目前用於 Power Apps 和 Power Automate。
注意
依安全性群組指派授權可能需要長達 24 小時才能完成授權指派。
如果您的組織已有授權指派流程,管理員仍可使用自動宣告原則,同時維持目前的工作流程。
管理員可以在 Microsoft 365 系統管理中心查看透過自動宣告原則指派授權的使用者清單。 然後,他們可以根據需要進行變更,例如取消指派自動宣告指派的授權,並將使用者移至指定群組以使用 Microsoft Entra 群組式授權。 如需群組式授權的詳細資訊,請前往群組式授權其他案例。
這裡有一些命令可以幫助取消分配授權並將使用者新增至所需的 Microsoft Entra 群組。
##
#Install and import AzureAD PowerShell module prior to running these commands
##
##You may be able to get a list of users, that have been auto-assigned a
##license directly, via Microsoft Admin Center. Follow instructions at
##https://learn.microsoft.com/en-us/microsoft-365/commerce/licenses/manage-auto-claim-policies?view=o365-worldwide#view-an-auto-claim-policy-report
##
##Once you have a list of users, you can use the following commands to remove
##the direct license assignment and add the user to a licensed group, or
##you may tweak the script to iterate through a list of users and
##perform this in bulk
##
##Please note that adding a user to a licensed group may not result in an
##immediate license assignment. Refer to https://learn.microsoft.com/en-us/entra/identity/users/licensing-group-advanced for more information
#############################################>
$Credential = Get-Credential
# Connect to Azure AD
Connect-AzureAD -Credential $Credential
#The user that will get a group based license
$LicensedUser = Get-AzureADUser -SearchString "<UPN, display name or object ID of the user for which you want to assign a license>"
#The group that has the license assigned
$LicensedGroup = Get-AzureADGroup -SearchString "<Object ID or name of the group that has a relevant license assigned>"
#SKU part number of the sku that needs to be unassigned (Power Apps Premium)
$SkuPartName = "POWERAPPS_PER_USER"
#Get the SkuID of the license that needs to be unassigned from the user
$LicenseSku = Get-AzureADSubscribedSku | Where-Object {$_.SkuPartNumber -eq $SkuPartName}
#Create the AssignedLicenses Object, used for removing direct license assignment from the user
$LicensesToRemove = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses
$LicensesToRemove.RemoveLicenses = $LicenseSku.SkuId
#Remove directly assigned license from the user
#Note that this command will result in an error if the user does not have the relevant license assigned directly
Set-AzureADUserLicense -ObjectId $LicensedUser.ObjectId -AssignedLicenses $LicensesToRemove
#Add user to a licensed group
Add-AzureADGroupMember -ObjectId $LicensedGroup.ObjectId -RefObjectId $LicensedUser.ObjectId