Skip to content

Populate a user's OAuthGroups using Microsoft Graph memberOf endpoint#1

Closed
Fatiz wants to merge 1 commit intoneed4swede:microsoft-authfrom
Fatiz:add-microsoft-group-support
Closed

Populate a user's OAuthGroups using Microsoft Graph memberOf endpoint#1
Fatiz wants to merge 1 commit intoneed4swede:microsoft-authfrom
Fatiz:add-microsoft-group-support

Conversation

@Fatiz
Copy link
Copy Markdown

@Fatiz Fatiz commented Aug 24, 2025

Given the current implementation is using: "https://graph.microsoft.com/v1.0/me" I figured it might be easy enough to add in group support since we are given the UserID.

Haphazardly tested plugging the same logic into the generic provider and confirmed to get the OAuthGroups field populated.
(real info replaced)

2025-08-24T02:58:04Z DBG Provider is not username
2025-08-24T02:58:04Z DBG Provider exists
2025-08-24T02:58:04Z DBG Email is whitelisted
2025-08-24T02:58:04Z DBG Authenticated userContext={"Email":"example@example.com","IsLoggedIn":true,"Name":"John Doe","OAuth":true,"OAuthGroups":"Apple,Long Group Name,Testing,Dog_users,All Users,JM_Users,TEST-Internal,Chicken-General,Software,Foo-All-Users,Foo_Bar4","Provider":"generic","TotpEnabled":false,"TotpPending":false,"Username":"John.Doe"}
2025-08-24T02:58:04Z INF Request address=172.18.0.7:55754 latency="367.273µs" method=GET path=/api/user status=200
2025-08-24T02:58:04Z INF Request address=172.18.0.7:55754 latency="711.567µs" method=GET path=/background.jpg status=200

Let me know your thoughts! 😄
I can test using this branch later the week.

@Fatiz Fatiz changed the base branch from main to microsoft-auth August 24, 2025 03:32
@Fatiz
Copy link
Copy Markdown
Author

Fatiz commented Aug 26, 2025

@need4swede Any thoughts on this? There's probably better ways, but would this be something that you think would be worthwhile putting into the PR @ tinyauthapp#304?

Additionally, it could maybe be made optional for people who don't care about groups. That way, folks won't need GroupMember.Read.All if they are not looking for the group functionality

@github-actions
Copy link
Copy Markdown

This PR has been inactive for 30 days and will be marked as stale.

@github-actions github-actions Bot added the stale label Sep 26, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 3, 2025

Closed for inactivity.

@github-actions github-actions Bot closed this Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant