Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting signInAudience of application registration with azure cli

I'm creating and app registration with azure cli using

az ad app create ...

function.

In the manifest of app registration there is a field:signInAudience which i want to set to: AzureADandPersonalMicrosoftAccount

Calling

az ad app update --id [[APP_ID]] --set signInAudience=AzureADandPersonalMicrosoftAccount

returns

Property 'signInAudience' not found on root. Send it as an additional property .
Updates to converged applications are not allowed in this version.

How can I change it?

like image 492
Dzior Avatar asked Nov 17 '22 22:11

Dzior


2 Answers

You can update the app with --available-to-other-tenants

az ad app update --id xxxx --available-to-other-tenants

This will set signInAudience property in manifest to either AzureADMultipleOrgs or AzureADMyOrg.

Check az ad app update -h for more help or Microsoft Docs

like image 103
Abdullahi Ibrahim Ahmed Avatar answered Jan 20 '23 00:01

Abdullahi Ibrahim Ahmed


It's possible with version 2.37.0 and above, with the new --sign-in-audience parameter:

az ad app create --display-name "My test app" --sign-in-audience AzureADandPersonalMicrosoftAccount

From the app create documentation:

--sign-in-audience Specifies the Microsoft accounts that are supported for the current application.

accepted values: AzureADMultipleOrgs, AzureADMyOrg, AzureADandPersonalMicrosoftAccount, PersonalMicrosoftAccount

like image 24
Métoule Avatar answered Jan 20 '23 01:01

Métoule