Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  How To Bulk Replace Roles

    Posted 06-05-2025 18:09

    Smith_Warren | 2023-10-27 21:07:20 UTC | #1

    Hello,

    How does postauthorizationsubject_bulkreplace work?

    One of the arguments to be passed is a list of role/division pairs (RoleDivisionGrant. I thought that it would be similar to a PatchUser(), but the following code does not work:

    user = 'weporiuqwoierupqwoierup' body = [ ] bodyPart = PureCloudPlatformClientV2.RoleDivisionGrants() bodyPart.roleid = 'ghjshdflkajsdhf' bodyPart.divisionid = '093847509382457' body.append(bodyPart) authinstance.postauthorizationsubjectbulkreplace(user, body)


    Smith_Warren | 2023-10-30 21:43:45 UTC | #2

    nvm, I figured it out. here's a sample:

    pairs = [] rdv = PureCloudPlatformClientV2.RoleDivisionGrants() body = PureCloudPlatformClientV2.RoleDivisionPair() body.roleid = 'laksjdf;lkasdjf;lkj' body.divisionid = 'a;sldkjf;alskdjf;lkj' pairs.append(body) rdv.grants = pairs

    authinstance.postauthorizationsubjectbulkreplace(user, rdv)


    system | 2023-11-30 21:43:50 UTC | #3

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


    This post was migrated from the old Developer Forum.

    ref: 22793