WorkIdentityNotAvailable

Li Tan 111 Reputation points
2021-08-13T15:55:26.687+00:00

Hi,

I got this error when signin with work user email tied to the company's Azure AD.

The manifest was set to "signInAudience": "AzureADandPersonalMicrosoftAccount",

<Errors><AdApiError><Code>123</Code><Detail i:nil="true"/><ErrorCode>WorkIdentityNotAvailable</ErrorCode><Message>You must use a personal Microsoft account to sign in to Bing Ads.</Message></AdApiError></Errors>

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
386 questions
{count} votes

Accepted answer
  1. Li Tan 111 Reputation points
    2021-08-16T17:10:18.803+00:00

    Resolved. Just need to migrate the work user email to Azure AD work account instead of personal account.


2 additional answers

Sort by: Most helpful
  1. Emily Tunggala 6 Reputation points
    2022-10-26T15:24:02.36+00:00

    Hello! I'm experiencing this same issue and would love clarification on the solution as well.


  2. Bryce Balbon 1 Reputation point
    2022-11-03T22:44:13.607+00:00

    Also had this issue. You need to authenticate to your app, from oauth_web_auth_code_grant.get_authorization_endpoint(), with your personal email account that is the base for your work account. I.E select the non-work ("Created by your Work or IT department") account (assuming they have the same email alias) and then copy paste the URI from that consent link into self.oauth_web_auth_code_grant.request_oauth_tokens_by_response_uri(RESPONSE_URI) which will give you your oauth_web_auth_code_grant.oauth_tokens.refresh_token. This will be a personal refresh token ending in '$$' -- you MUST REMOVE THIS '$$' from the end of the refresh token for it to work. Then you authenticate with the code you have. As mentioned above, do not restrict access to 'MyOrg' if this is your first setup -- I.E no need for the tenant variable.

    Took me a long time to figure out, wish the documentation was more clear on this.