New-AzCommunicationServiceSmtpUsername
create an SmtpUsernameResource.
Syntax
CreateExpanded (Default)
New-AzCommunicationServiceSmtpUsername
-CommunicationServiceName <String>
-ResourceGroupName <String>
-SmtpUsername <String>
[-SubscriptionId <String>]
[-EntraApplicationId <String>]
[-TenantId <String>]
[-Username <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaJsonFilePath
New-AzCommunicationServiceSmtpUsername
-CommunicationServiceName <String>
-ResourceGroupName <String>
-SmtpUsername <String>
-JsonFilePath <String>
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaJsonString
New-AzCommunicationServiceSmtpUsername
-CommunicationServiceName <String>
-ResourceGroupName <String>
-SmtpUsername <String>
-JsonString <String>
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
create an SmtpUsernameResource.
Examples
Example 1: Create a SMTP Username resource
New-AzCommunicationServiceSmtpUsername -SmtpUsername ContosoSmtpUsernameResource1 -CommunicationServiceName ContosoAcsResource1 -ResourceGroupName ContosoResourceProvider1 -EntraApplicationId 1ebe1d1a-1111-1111-1c11-11ad111bf111 -TenantId 11f111b1-11f1-11af-11ab-1d1cd111db11 -Username ContosoUsername1
EntraApplicationId : 1ebe1d1a-1111-1111-1c11-11ad111bf111
Id : /subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/ContosoResourceProvider1/providers/Microsoft.Communication/communicationServices/ContosoAcsResource1/smtpUsernames/ContosoSmtpUsernameResource1
Name : ContosoSmtpUsernameResource1
ResourceGroupName : ContosoResourceProvider1
SystemDataCreatedAt : 25-02-2025 11:24:05
SystemDataCreatedBy : newuser1@contoso.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 25-02-2025 11:24:05
SystemDataLastModifiedBy : newuser1@contoso.com
SystemDataLastModifiedByType : User
TenantId : aaaa1111-bbbb-2222-3333-aaaa11112222
Type : microsoft.communication/communicationservices/smtpusernames
Username : ContosoUsername1
Create a SMTP Username resource with the provided parameters.
Parameters
-CommunicationServiceName
The name of the CommunicationService resource.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EntraApplicationId
The application Id for the linked Entra Application.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-JsonFilePath
Path of Json file supplied to the Create operation
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CreateViaJsonFilePath
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-JsonString
Json string supplied to the Create operation
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CreateViaJsonString
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
The name is case insensitive.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SmtpUsername
The name of the SmtpUsernameResource.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
The ID of the target subscription.
The value must be an UUID.
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TenantId
The tenant of the linked Entra Application.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Username
The SMTP username.
Could be free form or in the email address format.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs