-
Notifications
You must be signed in to change notification settings - Fork 0
Switch BapTenant
Switches the current context to a specified BAP tenant.
Switch-BapTenant [-Id] <String> [-Force] [-ProgressAction <ActionPreference>] [<CommonParameters>]
This function allows you to switch the current context to a specified BAP tenant based on the tenant details stored in the local PSFramework configuration.
Switch-BapTenant -Id "Contoso"
This will switch the current context to the BAP tenant with the id "Contoso". It will ensure that the authentication token is valid, prompting for re-authentication if necessary.
Switch-BapTenant -Id "Contoso" -Force
This will switch the current context to the BAP tenant with the id "Contoso". It will force an authentication prompt, even if the current token is still valid.
The ID of the BAP tenant to switch to.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseInstruct the function to force an authentication prompt even if the current token is still valid. This can be useful if you want to ensure that you are using the most up-to-date credentials or if you want to switch to a different user within the same tenant.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Author: Mötz Jensen (@Splaxi)