azure-active-directoryazure-ad-b2cazure-cliazure-ad-powershell-v2

Azure AD - how to set app manifest properties programatically (accessTokenAcceptedVersion to v2 and signInAudience)?


Is there a way to programatically via API to set the manifest property "accessTokenAcceptedVersion" to 2? This is required due to issue explained here - our code is expecting the new STS, fails with:

WWW-Authenticate: Bearer error="invalid_token", error_description="The audience is invalid"

due to being old sts: "iss": "https://sts.windows.net/.../". Similarly looking to set the "signInAudience" property as well so that we can have our apps show up in B2C:

{
...
"accessTokenAcceptedVersion": 2,    
...
"signInAudience": "AzureADandPersonalMicrosoftAccount",    
...
}

Not seeing anything in powershell, cli or api(see also)

If i capture the portal network traffic i can see the PATCH to graph.windows.net/myorganization/aplicaitons/{GUID}?api-version=2.0 where it sets the JSON properties:

"accessTokenAcceptedVersion":2,

and

"signInAudience":"AzureADandPersonalMicrosoftAccount",

But it also sets some another property - and appears to be not documented way of doing things?

"logo@odata.mediaContentType":"application/json;odata=minimalmetadata"

and the signinaudience change sets:

"supportsConvergence":true,


Solution

  • check out the beta Graph APIs:

    Please note that this is still only available under the beta API of the Microsoft Graph.