FunctionsPublic/Get-GraphDocumentLibraryOfGroup.ps1

function Get-GraphDocumentLibraryOfGroup
{
    param([psobject]$accessToken, [string]$groupID)
    #
    # Get Sharepoint site corresponding to group
    #
    $responseBody = Invoke-RestMethod -Uri "https://graph.microsoft.com/v1.0/groups/$($groupID)/drive" -Headers @{"Authorization" = "Bearer $($accessToken.AccessTokenCredential.GetNetworkCredential().password)"}
    $jsonResponse = $responseBody | ConvertTo-JSON

    $documentLibrary = ConvertFrom-Json -InputObject $jsonResponse

    return $documentLibrary
}