Skip to content

Fix ActiveDirectroy secenario test #10569

@msJinLei

Description

@msJinLei

Description

Test-NewADServicePrincipalWithoutApp in ActiveDirectroy secenario test is legary now.

    # Test
    $servicePrincipal = New-AzADServicePrincipal -DisplayName $displayName
    $role = Get-AzRoleAssignment -ObjectId $servicePrincipal.Id

    # Assert
    Assert-NotNull $servicePrincipal
    Assert-AreEqual $servicePrincipal.DisplayName $displayName
    Assert-Null $role

When role is not specified explicitly, New-AzADServicePrincipal has a default role, which is "Contributor". And so the $role is not nul in the test case.

Cost

Metadata

Metadata

Assignees

No one assigned

    Labels

    Test InfraTest frameworkbugThis issue requires a change to an existing behavior in the product in order to be resolved.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions