Get a contact folder by using the contact folder ID.
There are two scenarios where an app can get another user's contact folder:
If the app has application permissions, or,
If the app has the appropriate delegated permissions from one user, and another user has shared a contact folder with that user, or, has given delegated access to that user. See details and an example.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
Contacts.Read, Contacts.ReadWrite
Delegated (personal Microsoft account)
Contacts.Read, Contacts.ReadWrite
Application
Contacts.Read, Contacts.ReadWrite
HTTP request
GET /me/contactFolders/{id}
GET /users/{id | userPrincipalName}/contactFolders/{id}
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
contactFolderId := "contactFolder-id"
result, err := graphClient.Me().ContactFoldersById(&contactFolderId).Get()
Import-Module Microsoft.Graph.PersonalContacts
# A UPN can also be used as -UserId.
Get-MgUserContactFolder -UserId $userId -ContactFolderId $contactFolderId