This example shows how to use the Set-MgBetaServicePrincipalClaimPolicy Cmdlet.
Parameters
-AdditionalProperties
Additional Parameters
Parameter properties
Type:
Hashtable
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
SetExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
SetViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-AudienceOverride
If specified, it overrides the content of the audience claim for WS-Federation and SAML2 protocols.
A custom signing key must be used for audienceOverride to be applied, otherwise, the audienceOverride value is ignored.
The value provided must be in the format of an absolute URI.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
SetExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
SetViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-BodyParameter
customClaimsPolicy
To construct, see NOTES section for BODYPARAMETER properties and create a hash table.
Parameter properties
Type:
IMicrosoftGraphCustomClaimsPolicy
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Set
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
SetViaIdentity
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Claims
Defines which claims are present in the tokens affected by the policy, in addition to the basic claim and the core claim set.
Inherited from customclaimbase.
To construct, see NOTES section for CLAIMS properties and create a hash table.
Parameter properties
Type:
IMicrosoftGraphCustomClaimBase[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
SetExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
SetViaIdentityExpanded
Position:
Named
Mandatory:
False
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
-Headers
Optional headers that will be added to the request.
Parameter properties
Type:
IDictionary
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Id
The unique identifier for an entity.
Read-only.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
SetExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
SetViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-IncludeApplicationIdInIssuer
Indicates whether the application ID is added to the claim.
It is relevant only for SAML2.0 and if a custom signing key is used.
the default value is true.
Optional.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
SetExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
SetViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-IncludeBasicClaimSet
Determines whether the basic claim set is included in tokens affected by this policy.
If set to true, all claims in the basic claim set are emitted in tokens affected by the policy.
By default the basic claim set isn't in the tokens unless they're explicitly configured in this policy.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
SetExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
SetViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Parameter properties
Type:
IApplicationsIdentity
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
SetViaIdentityExpanded
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
SetViaIdentity
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ResponseHeadersVariable
Optional Response Headers Variable.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
RHV
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ServicePrincipalId
The unique identifier of servicePrincipal
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
SetExpanded
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
Set
Position:
Named
Mandatory:
True
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.
To create the parameters described below, construct a hash table containing the appropriate properties.
For information on hash tables, run Get-Help about_Hash_Tables.
[(Any) <Object>]: This indicates any property can be added to this object.
[Id <String>]: The unique identifier for an entity.
Read-only.
[AudienceOverride <String>]: If specified, it overrides the content of the audience claim for WS-Federation and SAML2 protocols.
A custom signing key must be used for audienceOverride to be applied, otherwise, the audienceOverride value is ignored.
The value provided must be in the format of an absolute URI.
[Claims <IMicrosoftGraphCustomClaimBase- []>]: Defines which claims are present in the tokens affected by the policy, in addition to the basic claim and the core claim set.
Inherited from customclaimbase.
[Configurations <IMicrosoftGraphCustomClaimConfiguration- []>]: One or more configurations that describe how the claim is sourced and under what conditions.
[TreatAsMultiValue <Boolean?>]: This flag is only relevant in the case where the attribute is multivalued.
By default, transformations are only applied to the first element in a multi-valued claim, however setting this flag to true ensures the transformation is applied to all values, resulting in a multivalued output.
[IncludeApplicationIdInIssuer <Boolean?>]: Indicates whether the application ID is added to the claim.
It is relevant only for SAML2.0 and if a custom signing key is used.
the default value is true.
Optional.
[IncludeBasicClaimSet <Boolean?>]: Determines whether the basic claim set is included in tokens affected by this policy.
If set to true, all claims in the basic claim set are emitted in tokens affected by the policy.
By default the basic claim set isn't in the tokens unless they're explicitly configured in this policy.
CLAIMS <IMicrosoftGraphCustomClaimBase- []>: Defines which claims are present in the tokens affected by the policy, in addition to the basic claim and the core claim set.
Inherited from customclaimbase.
[Configurations <IMicrosoftGraphCustomClaimConfiguration- []>]: One or more configurations that describe how the claim is sourced and under what conditions.
[TreatAsMultiValue <Boolean?>]: This flag is only relevant in the case where the attribute is multivalued.
By default, transformations are only applied to the first element in a multi-valued claim, however setting this flag to true ensures the transformation is applied to all values, resulting in a multivalued output.