Chris-Simmons Absent Member.
Absent Member.
457 views

Scheduling Flow via API - Possible to assign to different user?

Jump to solution

Hi Guys,

I am putting together something that will schedule a flow to run in the future, and working on putting the API request together. Everything works as per the documentation, just I have a question...

When creating new flow schedules the JSON request has a property called "username".

I assumed I could put in the username of any of our users so the schedule would be assigned to them, but that doesn't seem to be the case. Whatever username I put in for that property, it always uses the username of the account I am using to authenticate with the API.

If I change the account I auth to the API with, the username that the flow schedule gets created against also changes to match.

Our user case is this:

- Member of the HR Team will run a "on-board new employee" flow, in advance of when the employee starts. THe actual start date is captured as an input.

- That flow will trigger some notifications and do some other things, then schedule the actual AD account creation for the actual start date via the API.

I wanted to be able to assign the scheduled flow to the same user that runs the initial flow, but not looking like that is possible unless I authenticate to the API as them.

I don't see why a 'username' property is included in the schema if it is ignored and just takes the authenticated user from the API call. Or maybe I am doing something wrong or something isn't working my end.

The workaround I can see is to capture logged-in user credentials and then pass them to the API, but I really don't want to go down that route.

Anybody have any ideas?

Thanks.

Chris.

Labels (1)
0 Likes
1 Solution

Accepted Solutions
reisen Absent Member.
Absent Member.

Re: Scheduling Flow via API - Possible to assign to different user?

Jump to solution

Hi Chris,

The username property is indeed ignored during schedule creation.  The reason it exists in the JSON object structure, is simply because this structure is internally shared between the "create" and "read" operations.  The inclusion of the property in the POST example in the API Guide is a mistake.

So unfortunately, the functionality you described does not currently exist - presumably for security considerations.

Regards,
Rotem

2 Replies
reisen Absent Member.
Absent Member.

Re: Scheduling Flow via API - Possible to assign to different user?

Jump to solution

Hi Chris,

The username property is indeed ignored during schedule creation.  The reason it exists in the JSON object structure, is simply because this structure is internally shared between the "create" and "read" operations.  The inclusion of the property in the POST example in the API Guide is a mistake.

So unfortunately, the functionality you described does not currently exist - presumably for security considerations.

Regards,
Rotem

Chris-Simmons Absent Member.
Absent Member.

Re: Scheduling Flow via API - Possible to assign to different user?

Jump to solution

Thanks for the quick and clear reply.

As I feared, but no worries. I will go back to the drawing board and think of a way to do it 🙂

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.