How to rename the security group?

Post Reply
Learn_TM1
Posts: 42
Joined: Mon Sep 21, 2015 2:24 pm
OLAP Product: Cognos TM1
Version: 10.2.2
Excel Version: Excel 2010

How to rename the security group?

Post by Learn_TM1 »

Hi,

I want to rename one security group. For example, change group AA to AB And I got to know that it is not able to rename one security group, instead, must delete this group AA, then add a new group AB. However, all client/group assignment will be lost for the old group AA. Is it one method to write a TI process to add a new group AB firstly, assign the same client/group to AB as AA, then delete group AA?

Best regards,

Learn_TM1
Wim Gielis
MVP
Posts: 3240
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: How to rename the security group?

Post by Wim Gielis »

Yes, that's a good way to proceed, but only a part of the solution.
Note that security that is set manually (through the interface or straight into the }... security cubes), will likely be lost when deleting the (original) group.
So in between assigning users to the new group, and deleting the original group, you will need to get the security rights of the new group equal to those of the original group.

- For TM1 objects where security is done with rules and the rules automatically carry over to the new group: no problem
- For TM1 objects where no security was applied: no problem either
- In all other cases: you'll likely have some work to do

Consider if using an alias on the }Groups dimension could be a quick solution to your problem of renaming a security group.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
User avatar
qml
MVP
Posts: 1097
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: How to rename the security group?

Post by qml »

You could try using the SwapAliasWithPrincipalName method. I have never tried it on a control dimension, but there is a good chance it will work.
  • Create an alias (e.g. called NewName) on the }Groups dimension.
    Populate the alias with the new name for the group whose name you want to change.
    Execute SwapAliasWithPrincipalName( '}Groups', 'NewName', 0 ) in a TI.
    Remove the alias.
Needless to say, try it in a dev environment first as things could go wrong!
Kamil Arendt
Wim Gielis
MVP
Posts: 3240
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: How to rename the security group?

Post by Wim Gielis »

qml wrote:You could try using the SwapAliasWithPrincipalName method. I have never tried it on a control dimension, but there is a good chance it will work.
  • Create an alias (e.g. called NewName) on the }Groups dimension.
    Populate the alias with the new name for the group whose name you want to change.
    Execute SwapAliasWithPrincipalName( '}Groups', 'NewName', 0 ) in a TI.
    Remove the alias.
Needless to say, try it in a dev environment first as things could go wrong!
I will do the tests for a customer of mine, somewhere in February-March, because they move from Cognos Express 10.2.1 to Cognos Express 10.2.2.
After the work is done I will report back the findings but I expect SwapAliasWithPrincipalName to do a good job when migrating from CAM security to native TM1 security.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
User avatar
qml
MVP
Posts: 1097
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: How to rename the security group?

Post by qml »

I have tried the SwapAliasWithPrincipalName on the }Groups dimension since my previous post and it worked perfectly. The version I tried it on was 10.2.2 FP4.
Kamil Arendt
Wim Gielis
MVP
Posts: 3240
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: How to rename the security group?

Post by Wim Gielis »

True. I did the same test on the same version, same finding (of course).
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
dsproffitt
Posts: 66
Joined: Wed Jul 16, 2014 9:20 am
OLAP Product: All of them
Version: All of them
Excel Version: 2003 -2013

Re: How to rename the security group?

Post by dsproffitt »

Please bear in mind that SwapAliasWithPrincipalName is an unsupported function and as such, all data should be backed up before using it.

What you really should do, is export your data create a new dimension with the correct element names then rebuild your cube an reimport the data.
Post Reply