Skip to content
This repository was archived by the owner on Jan 26, 2025. It is now read-only.
This repository was archived by the owner on Jan 26, 2025. It is now read-only.

assignUserToApplication() InvalidArgumentException with message 'First argument to Stream::create() must be a string, resource or StreamInterface.' #141

Description

@chuckienorton

I'm having trouble using the application assignUserToApplication method, which requires an AppUser.

Here is my current code:

$oktaAppUser =  new \Okta\Applications\AppUser();
$oktaAppUser->setId($oktaUserId);
$oktaAppUser->setScope("USER");

$oktaApp = $this->getApplication($oktaApplicationId);
$oktaApp->assignUserToApplication($oktaAppUser);

This returns the following error:
�InvalidArgumentException with message 'First argument to Stream::create() must be a string, resource or StreamInterface.'�

Am i initiating this incorrecly? I can retrieve 'read-only' items from $oktaApp like getApplicationUsers, etc.

Thanks in advance!
PS - this might be related to #133

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions