OAuth client creation from Premium App

Hi @GenesysCommunity

Regarding creating an OAuth client from the premium App.
I want to select All future divisions option.
Could you guide me regarding this scenario


Hi @Dileep_kaRanki

The process for selecting that option is mentioned here

If this doesn't work for you, there may be a difference in features for your version of the app that I'm not aware of.

I know about people related option but I'm asking related to grant type OAuth client credentials.

Hello,

When a user creates a "Client Credentials" (Grant Type) OAuth Client, the user can only assign (to the OAuth Client) the roles and divisions the user has access to.
I mean that the user (creating the OAuth Client) needs to have the AvtexInsights_AppRole role assigned to him, so he can hem enable/assign it on the OAuth Client.
The same applies to divisions enabled for that role.
If the user has the AvtexInsights_AppRole role assigned to him with only "Home" division, he can only assign the "Home" division for the AvtexInsights_AppRole at the OAuth Client level.
If the user has the AvtexInsights_AppRole role assigned to him with All Future Divisions, he can then assign the All Future Divisions for that role at the OAuth Client level.

Regards,

My query is regarding creating Role from Premium App
Is it possible to select all future divisions while creating the Role AvtexInsights_AppRole from Premium App

The approach you told is applicable to user based and not OAuth client based.
Reference Images are attached



If we need to do this for every user it is a manual process and it will take lot of time

Technically, there is no reason why you couldn't.

But you would have to do that work as you own your Premium Application Wizard (the TTEC/Avtex Insights app).
I mean the code was developed by TTEC/Avtex and is maintained and hosted by TTEC/Avtex.
It was started out of a sample we provide - the one explained here: https://developer.genesys.cloud/appfoundry/premium-app-wizard/
But that was likely on an older version of the code.

You would need to modify the module that takes care of creating OAuth Client in the wizard: https://github.com/MyPureCloud/purecloud-premium-app/blob/master/docs/wizard/scripts/modules/oauth-client.js
The module is currently setting the roles with roleIds parameter of PUT /api/v2/oauth/clients/{clientId}. To support All Divisions, you would need to use roleDivisions parameter instead (and All Divisions is equal to divisionId="*"). The user would also need to have the role assigned to him with same All Divisions (that's also done in the same module).

Regards,

I replied to your screenshot showing an OAuth Client with Client Credentials (the screenshot).

"Is it possible to select all future divisions while creating the Role AvtexInsights_AppRole"
No. The notion of division assignment is not at the role level.
It is at the user level (for a role assigned to the user), at the OAuth Client level (for an OAuth Client with Client Credentials Grant), ...

  1. If I assign the divisions to AvtexInsights_AppRole from users I was able to assign that division to OAuth Client
  2. In user level I'm seeing select all Future divisions as disabled ,the same option is not visible at OAuth client.If it is disabled at user level why I'm not able to see disabled at OAuth client levelCould you let me know the permissions required to see All future divisions at user and OAuth client.
    Reference screenshot is attached for reference

Yes. That's what I explained in my previous post. A user must have a role assigned to him in order to create an OAuth Client (Grant Type: Client Credentials) and to assign that role to the OAuth Client (Grant Type: Client Credentials).

When assigning the role to your user, select all your divisions and the "All Future Divisions" checkbox which already appears (but disabled) will be enabled.

The option will become available at the OAuth Client once you have enabled it for the Role at the User level as I explained in my previous post.

Regards,

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.