How to implement Azure multi tenant app access in angular 2

azure-web-sites azure-active-directory angular2-services angular2-directives azure-ad-graph-api

512 观看

2回复

56 作者的声誉

I'm new to angular 2 . I am working on Multi Tenant application in angular 2. I have done Multi Tenant application in ASP.netMVC.But in angular2 i'm not getting any idea.

I have done single tenant authentication in Angular 2 by following this article

any anser appriciated.

Thanks in Advance....!

作者: Balaraju Polaki 的来源 发布者: 2017 年 9 月 15 日

回应 2


1

11161 作者的声誉

Firstly ,you can make your registration multi-tenant by finding the "Multi-Tenanted" switch on the properties page of your application registration in the Azure portal and setting it to "Yes".

Then please update your code to send requests to /common .With a multi-tenant application, the application doesn’t know up front what tenant the user is from, so you can’t send requests to a tenant’s endpoint. Instead, requests are sent to an endpoint that multiplexes across all Azure AD tenants:

https://login.microsoftonline.com/common

In your code , try to replace tenant value to common . Please click here for more details about how to sign in any Azure Active Directory (AD) user using the multi-tenant application pattern .

作者: Nan Yu 发布者: 2017 年 9 月 15 日

1

56 作者的声誉

决定

I'm able to access multi tenant app in Angular 2. by tenant value as common

Thanks Nan

    public AdalConfig(): any {
    return {
        tenant: 'common',
        clientId: 'xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx',
        redirectUri: window.location.origin + '/',
        postLogoutRediFFFFrectUri: window.location.origin + '/'
    };

}
作者: Balaraju Polaki 发布者: 2017 年 9 月 15 日
来自类别的问题 :
32x32