SharePointグループを作ってユーザーを登録するサンプル
SharePointグループを作ってユーザーを登録するサンプルです。例によってWebサービスを利用。
require 'wss' HOST = "<SharePointServerのホスト>" PORT = <SharePointServerのポート> USER = "<ユーザー>" PASS = "<パスワード>" home = WSS.new( HOST, PORT, USER, PASS ) userGroup = home.service( :UserGroup, "sites/testsite" ) # グループの作成 userGroup.addGroup( "groupName"=>"test_group1", "ownerIdentifier"=>USER, "ownerType"=>"user", "defaultUserLoginName"=>USER, # デフォルトで登録するユーザー/指定しないと登録できない・・・。 "description"=>"テスト用グループ" ) # グループへのユーザーの追加 userGroup.addUserToGroup( "groupName"=>"test_group1", "userName"=>"test_user", "userLoginName"=>"foo\\user1", "userEmail"=>"", "userNotes"=>"" )