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

Please fix the graph scopes #119

Open
DanielSV92 opened this issue Sep 11, 2023 · 0 comments
Open

Please fix the graph scopes #119

DanielSV92 opened this issue Sep 11, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@DanielSV92
Copy link

If you try to use the component for OBO flow (which is possible), the helper.ts function is causing an error

export const getScopes = (graphScopes?: string[]) => { const scopes = graphScopes || []; if (!scopes.find((el: string) => el.toLowerCase() === "user.read")) { scopes.push("user.read"); } return scopes; };

here you are automatically adding the 'user.read' scope if not found, but it causes a conflict when trying to use .default due to not allowing specific scopes with default scope, something like this:

.default scope can't be combined with resource-specific scopes.

I strongly suggest to either remove that condition or tell the function to get something like

export const getScopes = (graphScopes?: string[]) => { const scopes = graphScopes || ['user.read']; return scopes; };

@DanielSV92 DanielSV92 added the bug Something isn't working label Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants