Skip to content

Latest commit

 

History

History
363 lines (288 loc) · 7.7 KB

Set-AzureADMSServicePrincipal.md

File metadata and controls

363 lines (288 loc) · 7.7 KB
external help file Module Name online version schema
Microsoft.Open.MS.GraphBeta.PowerShell.dll-Help.xml
AzureADPreview
2.0.0

Set-AzureADMSServicePrincipal

SYNOPSIS

Updates a service principal.

SYNTAX

Set-AzureADMSServicePrincipal -Id <String> [-AccountEnabled <String>] [-AppId <String>]
 [-AppRoleAssignmentRequired <Boolean>] [-CustomSecurityAttributes <Object>] [-DisplayName <String>]
 [-ErrorUrl <String>] [-LogoutUrl <String>] [-Homepage <String>] [-SamlMetadataUrl <String>]
 [-MicrosoftFirstParty <Boolean>] [-PublisherName <String>] [-PreferredTokenSigningKeyThumbprint <String>]
 [-ReplyUrls <System.Collections.Generic.List`1[System.String]>]
 [-ServicePrincipalNames <System.Collections.Generic.List`1[System.String]>]
 [-Tags <System.Collections.Generic.List`1[System.String]>]
 [-KeyCredentials <System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsKeyCredential]>]
 [-PasswordCredentials <System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsPasswordCredential]>]
 [<CommonParameters>]

DESCRIPTION

Updates a service principal in Azure Active Directory (Azure AD).

EXAMPLES

Example 1

PS C:\> Set-AzureADMSServicePrincipal -Id 2e0d8ca7-57d1-4a87-9c2a-b3638a4cadbf -AccountEnabled $False

This command disables the account of the specified service principal.

Example 2

PS C:\> $attributes = @{
    Engineering = @{
        "@odata.type" = "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
        "Project@odata.type" = "#Collection(String)"
        Project = @("Baker","Cascade")
    }
}
PS C:\> Set-AzureADMSServicePrincipal -Id 7d194b0c-bf17-40ff-9f7f-4b671de8dc20 -CustomSecurityAttributes $attributes

Assign a custom security attribute with a multi-string value to an application (service principal).

  • Attribute set: Engineering
  • Attribute: Project
  • Attribute data type: Collection of Strings
  • Attribute value: ("Baker","Cascade")

Example 3

PS C:\> $attributesUpdate = @{
    Engineering = @{
        "@odata.type" = "#Microsoft.DirectoryServices.CustomSecurityAttributeValue"
        "Project@odata.type" = "#Collection(String)"
        Project = @("Alpine","Baker")
    }
}
PS C:\> Set-AzureADMSServicePrincipal -Id 7d194b0c-bf17-40ff-9f7f-4b671de8dc20 -CustomSecurityAttributes $attributesUpdate 

Update a custom security attribute with a multi-string value for an application (service principal).

  • Attribute set: Engineering
  • Attribute: Project
  • Attribute data type: Collection of Strings
  • Attribute value: ("Alpine","Baker")

PARAMETERS

-AccountEnabled

Indicates whether the account is enabled.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AppId

Specifies the application ID.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AppRoleAssignmentRequired

Indicates whether an application role assignment is required.

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomSecurityAttributes

Custom security attributes for the service principal.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName

Specifies the display name.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ErrorUrl

Specifies the error URL.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Homepage

Specifies the home page.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id

Specifies the ID of a service principal in Azure AD.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-KeyCredentials

Specifies key credentials.

Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsKeyCredential]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LogoutUrl

Specifies the logout URL.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MicrosoftFirstParty

Indicates whether the service principal is for a Microsoft first-party app.

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PasswordCredentials

Specifies password credentials.

Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsPasswordCredential]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreferredTokenSigningKeyThumbprint

Preferred token signing key thumbprint for the service principal.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PublisherName

Specifies the publisher name.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReplyUrls

The URLs that user tokens are sent to for sign in with the associated application, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to for the associated application.

Type: System.Collections.Generic.List`1[System.String]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SamlMetadataUrl

@{Text=}

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServicePrincipalNames

Specifies service principal names.

Type: System.Collections.Generic.List`1[System.String]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tags

Specifies an array of tags. Note that if you intend for this service principal to show up in the All Applications list in the admin portal, you need to set this value to {WindowsAzureActiveDirectoryIntegratedApp}

Type: System.Collections.Generic.List`1[System.String]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

OUTPUTS

System.Object

NOTES

RELATED LINKS