在 Azure AD 中使用 管理员istrative Units 委托打印机管理员

本文介绍了通用打印如何与 Azure Active Directory(Azure AD)中的管理单元集成。 管理单元将角色中的权限限制为你定义的组织的任何部分。 例如,可以使用管理单元将打印机管理员istrator 角色委托给区域打印管理员,以便他们只能在支持的区域管理打印机。

有关 Azure Active Directory 中提供的附加详细信息,请参阅 Azure Active Directory 中的管理员单元。

先决条件

  • 配置 Azure 管理员istrative Unit
    • 具有特权角色管理员istrator 或 Global 管理员istrator 角色的管理员帐户
  • 委托的打印机管理员istrator
    • 分配给管理单元内每个打印机管理员istrator 的 Azure AD 高级版 P1 或 P2 许可证
    • 通用打印合格许可证分配给管理单元中的每个打印机管理员istrator

配置 管理员istrative 单元

步骤 1:创建管理单元

有关 各种选项的详细信息,请参阅“创建或删除管理单元 ”。

  1. 使用特权角色管理员istrator 或 Global 管理员istrator 帐户登录到Azure 门户。
  2. 选择“Azure Active Directory”>“管理单元” 。
  3. 选择添加
  4. 在“名称”框中,输入管理单元的名称。 (可选)添加管理单元的说明。
  5. 选择“ 下一步:分配角色 >”。
  6. 选择 打印机管理员 角色,然后选择要将此角色分配给此管理单元范围的用户或组。
  7. 在“查看 + 创建”选项卡上,查看管理单元和所有角色分配。
  8. 选择“创建”按钮。

步骤 2:分配要由作用域管理员管理的打印机

Azure 管理员istrative Units 提供了 2 种方法,用于管理员定义分配的管理权限范围内的设备集。

  1. 动态设备成员身份
    • 成员将根据管理员设置成员身份规则自动更新
  2. 分配的成员身份
    • 成员由管理员单元管理员手动分配和更新

选项 1:动态打印机成员身份规则

有关 更多详细信息,请参阅使用动态成员身份规则 管理单元的用户或设备。

注意

可能需要一些时间才能根据动态设备成员身份规则评估管理单元中的打印机列表。

通用打印连接器委派管理员责任
  1. 最初创建管理单元后,返回到管理员单元

  2. 选择要向其添加打印机的已创建管理单元。

  3. 选择“属性”。

  4. “成员身份类型 ”列表中,选择“ 动态设备”。

  5. 选择“添加动态查询”。

  6. 使用规则生成器指定动态成员资格规则。 有关详细信息,请参阅 Azure 门户中的规则生成器

  7. 在规则生成器中

    properties 运算符
    systemLabels 包含 PrinterStandard
    extensionAttribute2 开头为 <连接器命名架构>

提示

记下动态查询规则中使用的“属性”字段和值。 稍后在部署过程中需要这些内容。

按打印机位置委派管理员责任
  1. 最初创建管理单元后,返回到管理员单元

  2. 选择要向其添加打印机的已创建管理单元。

  3. 选择“属性”。

  4. “成员身份类型 ”列表中,选择“ 动态设备”。

  5. 选择“添加动态查询”。

  6. 使用规则生成器指定动态成员资格规则。 有关详细信息,请参阅 Azure 门户中的规则生成器

  7. 在规则生成器中

    properties 运算符
    systemLabels Contains PrinterStandard
    extensionAttribute3 Contains USA

提示

记下动态查询规则中使用的“属性”字段和值。 稍后在部署过程中需要这些内容。

选项 2:静态打印机成员身份列表

有关 更多详细信息,请参阅将用户、组或设备添加到管理单元

  1. 最初创建管理单元后,返回到管理员单元
  2. 选择要向其添加打印机的已创建管理单元。
  3. 选择“属性”。
  4. 在“成员身份类型”列表中,选择“已分配”。
  5. 如果进行了更改,请记得 保存 更改。
  6. 选择“设备” 。
  7. 选择“添加设备”。
  8. “选择 ”窗格中,选择要添加到管理单元的打印机,然后选择“ 选择”。

同步打印机属性

通用打印与 Azure AD 设备对象和管理单元的集成在如何委托打印机管理员istrator 角色方面提供了很大的灵活性和自定义。 通过利用 Azure AD 设备对象的“extensionAttributeX”,组织可以选取并选择用于定义不同打印机管理员范围的打印机元数据的组合。

为了支持这种灵活性,需要定期将打印机元数据从通用打印同步到 Azure AD。 可以通过执行脚本(如以下示例或任何其他形式的自动化)来完成此操作。

下面的示例提供了一个起始参考,客户应修改脚本以满足自己的部署需求。

示例 PowerShell 脚本

$ErrorActionPreference = "Stop"
Connect-MgGraph -Scopes "Directory.AccessAsUser.All", "Printer.Read.All"

$tenantId = (Get-MgContext).TenantId
Write-Host "Starting processing of Universal Print printers in tenant $tenantId"

# This streams pages of printers and does not require them to all be loaded at once.
Get-MgPrintPrinter -All -ExpandProperty "connectors" | ForEach-Object -Process {
    $printer = $_

    Write-Host "Fetching Azure AD device for printer $($printer.DisplayName)"
    $device = Get-MgDevice -Filter "deviceId eq '$($printer.Id)'" -Top 1

    # The display name of the Azure AD device is set to the initial display name
    # of the printer. This sets extensionAttribute1 to the current name.
    $extensionAttribute1 = "$($printer.DisplayName)"

    # If the printer was registered with the Universal Print connector then the
    # display name of the connector will be present in extensionAttribute2.
    $extensionAttribute2 = "$($printer.Connectors[0].DisplayName)"

    # If the printer has a country or region set in its location properties it
    # will be set to extensionAttribute15. Other location properties can be used
    # as well.
    $extensionAttribute3 = "$($printer.Location.CountryOrRegion)"

    $existingExtensionAttributes = $device.AdditionalProperties.extensionAttributes
    if ($extensionAttribute1 -ne "$($existingExtensionAttributes.extensionAttribute1)" -or
        $extensionAttribute2 -ne "$($existingExtensionAttributes.extensionAttribute2)" -or
        $extensionAttribute3 -ne "$($existingExtensionAttributes.extensionAttribute3)")
    {
        Write-Host "Updating Azure AD device extension attributes for printer $($printer.DisplayName)"
        Update-MgDevice -DeviceId $device.Id -BodyParameter @{
            "extensionAttributes" = @{
                "extensionAttribute1" = $extensionAttribute1
                "extensionAttribute2" = $extensionAttribute2
                "extensionAttribute3" = $extensionAttribute3
            }
        }
    }
}

注意

执行此示例脚本需要用户帐户

  • “Windows 365 管理员istrator”和“Printer 管理员istrator”
  • 或者,“全局管理员istrator”

范围管理员与租户打印机管理员

作用域内打印机管理员具有许多作为租户打印机管理员istrator 角色的访问权限。 下表汇总了相似性和差异。

管理员操作 打印机管理员角色 范围打印机管理员1
注册打印机 2
注册连接器 2
注销打印机
注销连接or
列出打印机 3
列出打印机共享 3
列出连接器 3
打印机属性 3
打印机共享属性 3
共享打印机
打印机访问控制
交换打印机共享
在打印队列中查看作业状态
文档转换
使用情况和报告

注意:

  1. 作用域管理员只能管理 Azure AU 配置中定义的打印机集,除非另有指定。
  2. 作用域管理员可在任何打印机或连接器上执行操作。
  3. 作用域内管理员会看到所有打印机、打印机共享和连接器,但仅限于对 Azure AU 配置外部的打印机、打印机共享和连接器的只读访问权限。