<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
Assignment Error "Blank is an Invalid Value for UserName Field (Code Blank)"
Lifecycle Management
Overview

When assigning a user to an application, the user assignment fails with an error visible under the Assignment tab of the application:

 Blank is an invalid value for username field (code blank).

 

Applies To
  • Applications
  • User Assignment
  • Group Assignment
  • Custom Attribute Username
Cause

For example, if an application has a custom username set on the Sign On tab, as shown below:

Credentials details

The attribute (employeeid, in this example) is required to generate the application username. If this is not populated at the exact time the user is assigned to the application, this error is likely to occur.

Blank is an invalid value for userName field

If the userName is populated when checking later by opening the AppUser profile assignment, the error will remain. This only means that the attribute used for the username was updated after assigning the user to the application.

Edit User assignment

 

Solution

Resolving for Individual Users

First, this may be checked and resolved on an individual basis from the Dashboard > Tasks page by locating this error either by application or by user, editing the user assignment to a valid userName, and click "Save Assignment and Retry" to complete the assignment and initiate provisioning once more (if configured for the app).

This method is especially helpful to unblock users currently unable to access the application.

Another option is updating the app assignment for the affected user:

  • User assigned to the app as Individual: Convert assignments > Select assignments to convert > Convert Selected.

  • User assigned to the app through group membership: Edit User Assignment > Administrator (overrides group).

    Edit User Assignment  

Resolving by modifying group membership assignments

The best long-term solution will be to ensure the normal flow of application assignments is deferred until all necessary attributes or conditions are met for the User. One way to enforce this would be to leverage the Okta group rules feature in creating a group with memberships that are made up of only users who have the valid attribute used for assignment populated. The steps to accomplish this would be:

  1. Create an Okta Group Rule to assign users to the application using a new or existing Okta Group.

  2. Using Okta Expression Language, create a custom expression such as: user.attribute_name != '' AND user.attribute_name != null.

    • attribute_name is the variable that this application's username format depends on, such as employeeid from a previous example.

  3. Add any other conditions that would determine if Users should be assigned to be compatible with Expressions in group rules.

  4. Activate the Group Rule and verify that the expected users are added as members.

  5. Assign the group to the application.

After accomplishing these actions, every future user with the required attributes will get assigned to the group by rule and assigned the app only when the required attribute is populated.

Resolving by modifying attribute mappings

Some attributes can be mapped to a Custom Okta User attribute and used to populate the application username.

  1. Go to Directory > Profile Editor.

  2. Under Filters, click Directories.

  3. Select Mappings > Configure User Mappings for the specific directory.

  4. In the Domain to Okta mappings, enter the attribute, such as samAccountName into an open Okta attribute field:

Mappings

 Mappings 

  1. Click Save Mappings.

  2. Edit User Assignment:
    1. Navigate to the application's Assignment page.

    2. Press the pencil icon to edit the user and update the username.

    3. Press the Save button.

  3. Finally, update the Application username format in the app Sign On tab to the new variable. From this example, user.samAccountName would be entered.

Related References

 
Loading
Assignment Error "Blank is an Invalid Value for UserName Field (Code Blank)"