Forum Discussion
cbriscoe
8 months agoContributor
HI Satish P
You can delete users and groups using Extender rules. Try this rule below. Have fun :).
Imports System
Imports System.Data
Imports System.Data.Common
Imports System.IO
Imports System.Collections.Generic
Imports System.Globalization
Imports System.Linq
Imports Microsoft.VisualBasic
Imports System.Windows.Forms
Imports OneStream.Shared.Common
Imports OneStream.Shared.Wcf
Imports OneStream.Shared.Engine
Imports OneStream.Shared.Database
Imports OneStream.Stage.Engine
Imports OneStream.Stage.Database
Imports OneStream.Finance.Engine
Imports OneStream.Finance.Database
Namespace OneStream.BusinessRule.Extender.DeleteSecurityGroups
Public Class MainClass
Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As ExtenderArgs) As Object
Try
Select Case args.FunctionType
Case Is = ExtenderFunctionType.Unknown
Dim secGroupsToDelete As New List(Of String)({"GroupA","GroupB","GroupC"})
For Each secGroup As String In secGroupsToDelete
BRApi.Security.Admin.DeleteGroup(si,secGroup)
BRAPi.ErrorLog.LogMessage(si, "Security Group '" & secGroup & "' deleted by rule.")
Next
End Select
Return Nothing
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
End Class
End Namespace
Remeber - You tell the code what you want to delete by putting it in a Lookup transformation rule.
Related Content
- 2 years ago
- 7 months ago
- 11 months ago
- 2 months ago