Hi Godwin,

Thanks!
Had to alter the above code as follows, though.

*var tenantManagerService = new
Packages.org.wso2.carbon.um.ws.service.TenantManagerService();*
*var tenantId = tenantManagerService.getTenantId(tenantDomain);*


Thanks again for pointing out where to look for. :)

Regards,

On Tue, Nov 18, 2014 at 1:59 PM, Godwin Amila Shrimal <god...@wso2.com>
wrote:

> Hi Supun,
>
> Use can use following code to get the tenantId.
>
> UserRealmService.getTenantManager().getTenantId(tenantDomain);
>
> On Tue, Nov 18, 2014 at 1:52 PM, Supun Sethunga <sup...@wso2.com> wrote:
>
>> Hi,
>>
>> How can do $subject?
>>
>> I was able to get the Tenant Domain as follows though.
>>
>> var user=jagg.getUser();
>> var MultitenantUtils =
>> Packages.org.wso2.carbon.utils.multitenancy.MultitenantUtils;
>> var tenantDomain = MultitenantUtils.getTenantDomain(user);
>>
>> Thanks,
>> Supun
>>
>> --
>> *Supun Sethunga*
>> Software Engineer
>> WSO2, Inc.
>> lean | enterprise | middleware
>> Mobile : +94 716546324
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Godwin Amila Shrimal*
> Senior Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94772264165*
> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>*
> twitter: https://twitter.com/godwinamila
>



-- 
*Supun Sethunga*
Software Engineer
WSO2, Inc.
lean | enterprise | middleware
Mobile : +94 716546324
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to