Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

I am trying to use microsoft graph auth library preview. I amable to initialize the graphClient but unable to get data.I am getting unauthorized 401. #25

@victormarcus

Description

@victormarcus

"code": "InvalidAuthenticationToken", "message": "CompactToken parsing failed with error code: 80049217",
`List scopes = new ArrayList();
scopes.add("User.Read.All");

ClientCredentialProvider authProvider = new ClientCredentialProvider(app-Id,
scopes_list,
client-Secret,
tenantId, NationalCloud.Global);

IgraphClient graphClient = GraphServiceClient.builder().authenticationProvider(authProvider).logger(logger)
.buildClient();

IUserCollectionPage users = graphClient.users()
.buildRequest()
.get();
List usersList = users.getCurrentPage();
for(User user : usersList) {
System.out.println(user.displayName);
}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions