nestedAppAuth module

Functions

addNAATrustedOrigins(string[])

Registers the origins of child apps as trusted for Nested App Auth (NAA).

This allows a top-level parent app to specify which child app origins are considered trusted

canParentManageNAATrustedOrigins()

Checks if the parent has the capability to manage its list of trusted child origins for Nested App Auth (NAA).

deleteNAATrustedOrigins(string[])

Removes previously trusted child app origins from Nested App Auth (NAA).

The specified origins will no longer be considered trusted.

getParentOrigin()

Gets the origin of the parent window if available. This will be the top-level origin in the case of a parent app. It is used to pass to the embedded child app to initialize the Nested App Auth bridge.

isDeeplyNestedAuthSupported()

Checks if NAA deeply nested scenario supported by the host

isNAAChannelRecommended()

Checks if MSAL-NAA channel recommended by the host

Function Details

addNAATrustedOrigins(string[])

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Registers the origins of child apps as trusted for Nested App Auth (NAA).

This allows a top-level parent app to specify which child app origins are considered trusted

function addNAATrustedOrigins(appOrigins: string[]): Promise<string>

Parameters

appOrigins

string[]

An array of child app origins to trust (must be a non-empty array).

Returns

Promise<string>

A Promise resolving with the result of the action.

canParentManageNAATrustedOrigins()

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Checks if the parent has the capability to manage its list of trusted child origins for Nested App Auth (NAA).

function canParentManageNAATrustedOrigins(): boolean

Returns

boolean

true if parent can manage NAA TrustedOrigins, false otherwise

deleteNAATrustedOrigins(string[])

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Removes previously trusted child app origins from Nested App Auth (NAA).

The specified origins will no longer be considered trusted.

function deleteNAATrustedOrigins(appOrigins: string[]): Promise<string>

Parameters

appOrigins

string[]

An array of child app origins to remove from the trusted list (must be a non-empty array).

Returns

Promise<string>

A Promise resolving with the result of the action.

getParentOrigin()

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the origin of the parent window if available. This will be the top-level origin in the case of a parent app. It is used to pass to the embedded child app to initialize the Nested App Auth bridge.

function getParentOrigin(): string | null

Returns

string | null

The origin string if available, otherwise null

isDeeplyNestedAuthSupported()

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Checks if NAA deeply nested scenario supported by the host

function isDeeplyNestedAuthSupported(): boolean

Returns

boolean

true if host supports

isNAAChannelRecommended()

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Checks if MSAL-NAA channel recommended by the host

function isNAAChannelRecommended(): boolean

Returns

boolean

true if host is recommending NAA channel and false otherwise