< Back

Connect-MSGraph

Sat Jan 18, 2020 11:38 am

NAME Connect-MSGraph



SYNOPSIS





SYNTAX

Connect-MSGraph [-ForceInteractive <SwitchParameter>] [-PassThru <SwitchParameter>] [-Quiet <SwitchParameter>]

[<CommonParameters>]



Connect-MSGraph [-ForceNonInteractive <SwitchParameter>] [-PassThru <SwitchParameter>] [-Quiet <SwitchParameter>]

[<CommonParameters>]



Connect-MSGraph -Credential <PSCredential> [-PassThru <SwitchParameter>] [-Quiet <SwitchParameter>]

[<CommonParameters>]



Connect-MSGraph [-ClientSecret <string>] [-PassThru <SwitchParameter>] [-Quiet <SwitchParameter>]

[<CommonParameters>]



Connect-MSGraph [-AdminConsent <SwitchParameter>] [-PassThru <SwitchParameter>] [-Quiet <SwitchParameter>]

[<CommonParameters>]





DESCRIPTION

Authenticates with Graph.





PARAMETERS

-ForceInteractive <SwitchParameter>

If the ForceInteractive flag is set, this cmdlet will always create an interactive window to authenticate. If

the ForceInteractive flag is not set, this cmdlet is attempt to authenticate with cached credentials before

falling back to showing an interactive window.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-ForceNonInteractive <SwitchParameter>

If the ForceNonInteractive flag is set, this cmdlet will never create an interactive window to authenticate,

and will throw an "AdalException" if authentication fails. If the ForceNonInteractive flag is not set, this

cmdlet is attempt to authenticate with cached credentials before falling back to showing an interactive window.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Credential <PSCredential>

The PSCredential object to use when specifying the username and password while authenticating.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PSCredential <PSCredential>

The PSCredential object to use when specifying the username and password while authenticating.



This is an alias of the Credential parameter.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ClientSecret <string>

If the client secret is set, app-only authentication will be performed using the client ID specified by the

AppId environment parameter.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AdminConsent <SwitchParameter>

If the AdminConsent flag is set, admin consent can be granted for the currently selected AppId (this can be

seen with the "Get-MSGraphEnvironment" cmdlet) during authentication.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Quiet <SwitchParameter>

If the '-Quiet' flag is set, this cmdlet will suppress output upon successfully logging in.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-PassThru <SwitchParameter>

If the PassThru flag is set, this cmdlet will return the access token that was obtained. This flag is ignored

if the '-Quiet' flag is set.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS





RELATED LINKS