Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authenticating and accessing gmail accounts #7264

Open
2 tasks
aelhennawy opened this issue Aug 20, 2024 · 0 comments
Open
2 tasks

Authenticating and accessing gmail accounts #7264

aelhennawy opened this issue Aug 20, 2024 · 0 comments
Labels
bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package Needs: Attention 👋 Awaiting response from the MSAL.js team public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.

Comments

@aelhennawy
Copy link

Core Library

MSAL.js (@azure/msal-browser)

Core Library Version

3.10.0

Wrapper Library

MSAL Angular (@azure/msal-angular)

Wrapper Library Version

3.0.13

Public or Confidential Client?

Public

Description

First of all if this is not the right place to post this please let me know where to post it.
I'm getting an error when trying to access gmail accounts. I was able to get the token for my gmail account that I've added to the Outlook Mac client, The problem i have when trying to list messages in the inbox using Graph APIs i get an empty list.
Also when i try to get specific message i get an error

Error Message

{ "error": { "code": "ErrorInvalidMailboxItemId", "message": "Item '{ITEM_ID}' doesn't belong to the targeted mailbox '{MAILBOX}'." } }

MSAL Logs

No response

Network Trace (Preferrably Fiddler)

  • Sent
  • Pending

MSAL Configuration

MsalModule.forRoot(
      new PublicClientApplication({
        auth: {
          clientId: environment.msalConfig.auth.clientId,
          authority: environment.msalConfig.auth.authority,
          redirectUri: "/",
          postLogoutRedirectUri: '/'
        },
        cache: {
          cacheLocation: BrowserCacheLocation.LocalStorage,
        },
        system: {
          allowNativeBroker: false,
          loggerOptions: {
            loggerCallback,
            logLevel: LogLevel.Info,
            piiLoggingEnabled: false
          }
        }
      }),
      {
        interactionType: InteractionType.Popup,
        authRequest: {
          scopes: environment.apiConfig.scopes,
        },
      },
      {
        interactionType: InteractionType.Popup, // MSAL Interceptor Configuration
        protectedResourceMap: new Map([
          [environment.apiConfig.uri, environment.apiConfig.scopes],
          [environment.apiConfig.uri + "/messages", environment.apiConfig.scopes],
        ]),
      }
    ),

Relevant Code Snippets

const url: string = `https://graph.microsoft.com/v1.0/me/messages`;

    this.http.get(url).subscribe((response: any) => {
      console.log(response);
    });

Reproduction Steps

  1. Acquire token
  2. Call Graph API
  3. Token is added to the request using the Interceptor

Expected Behavior

List of messages inside the inbox folder

Identity Provider

Entra ID (formerly Azure AD) / MSA

Browsers Affected (Select all that apply)

Other

Regression

No response

Source

Internal (Microsoft)

@aelhennawy aelhennawy added bug-unconfirmed A reported bug that needs to be investigated and confirmed question Customer is asking for a clarification, use case or information. labels Aug 20, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Aug 20, 2024
@github-actions github-actions bot added msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications labels Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package Needs: Attention 👋 Awaiting response from the MSAL.js team public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.
Projects
None yet
Development

No branches or pull requests

1 participant