external help file | applicable | schema |
---|---|---|
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online |
2.0.0 |
Connect to the Microsoft Graph
Connect-PnPMicrosoftGraph -Scopes <String[]>
Connect-PnPMicrosoftGraph -AppId <String>
-AppSecret <String>
-AADDomain <String>
Uses the Microsoft Authentication Library (Preview) to connect to Azure AD and to get an OAuth 2.0 Access Token to consume the Microsoft Graph API
PS:> Connect-PnPMicrosoftGraph -Scopes $arrayOfScopes
Connects to Azure AD and gets and OAuth 2.0 Access Token to consume the Microsoft Graph API including the declared permission scopes. The available permission scopes are defined at the following URL: https://graph.microsoft.io/en-us/docs/authorization/permission_scopes
PS:> Connect-PnPMicrosoftGraph -AppId '<id>' -AppSecret '<secret>' -AADDomain 'contoso.onmicrosoft.com'
Connects to the Microsoft Graph API using application permissions via an app's declared permission scopes. See https://github.com/SharePoint/PnP-PowerShell/tree/master/Samples/Graph.ConnectUsingAppPermissions for a sample on how to get started.
The AAD where the O365 app is registred. Eg.: contoso.com, or contoso.onmicrosoft.com.
Type: String
Parameter Sets: AAD
Required: True
Position: Named
Accept pipeline input: False
The client id of the app which gives you access to the Microsoft Graph API.
Type: String
Parameter Sets: AAD
Required: True
Position: Named
Accept pipeline input: False
The app key of the app which gives you access to the Microsoft Graph API.
Type: String
Parameter Sets: AAD
Required: True
Position: Named
Accept pipeline input: False
The array of permission scopes for the Microsoft Graph API.
Type: String[]
Parameter Sets: Scope
Required: True
Position: Named
Accept pipeline input: False