<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Why the Groups Claim Is Not Returning Active Directory Groups
API Access Management
Overview

There is a Groups claim created for the application/authorization server, and it is being returned successfully, but for users that are members of groups in Active Directory (or another app group that was imported from outside of Okta), the claim does not contain the full list of the user's groups.

Applies To
  • OpenID Connect/OAuth applications
  • Org Authorization Server
  • Custom Authorization Server
Cause

The Groups "Filter" claim type will only match against groups that were created/are local to Okta, and will not match against any App groups or Active Directory groups. This limitation includes the filter using "Matches Regex".

Solution

If groups of this type should be returned, use a Groups Expression, not a Filter.

  • Here is what that looks like when using the Org Authorization Server:

Using Org Authorization Server

  • And here is what that looks like when using a Custom Authorization Server (such as the one named Default):

Using a Custom Authorization Server

  • For example, to get all the Active Directory groups to which the user is assigned, use the following Expression:
    Groups.startsWith("active_directory","",100)
  • If looking to get only the Active Directory groups that start with "Admin_" or a similar substring, change the second argument in this expression as seen below:
    Groups.startsWith("active_directory","Admin_",100)
  • If looking to get groups from another app, change the first argument to match the application variable name. For example, to get the Google Groups, use the following:
    Groups.startsWith("google","",100)


Related References

Loading
Why the Groups Claim Is Not Returning Active Directory Groups