Skip to content

Error_MsaAppDoesNotExist - The corresponding MSA application does not existΒ #3380

@richardsummers2019

Description

@richardsummers2019

Describe the bug

Using the Rest Api I create an App Registration with this body:

POST - https://graph.microsoft.com/v1.0/applications

    $appRegistration = @{
        "displayName"    = $appRegistrationName;
        "signInAudience" = "AzureADandPersonalMicrosoftAccount";
        "info"           = @{
            "termsOfServiceUrl"   = $termsOfServiceUrl;
            "privacyStatementUrl" = $privacyStatementUrl;
        };
        "web"            = @{
            "homePageUrl"  = $uiAppUrl;
            "redirectUris" = $appRegistrationRedirectUrls
        };
    }

This works fine - but when I call the Create Client Secret code

POST - https://graph.microsoft.com/v1.0/applications/{id}/addPassword

    $body = @{
        passwordCredential = @{
            displayName = $KeyName
            endDateTime = "3000-12-31T00:00:00Z"
        }
    } | ConvertTo-Json -Depth 3

It fails with this message:

Error_MsaAppDoesNotExist - The corresponding MSA application does not exist

Nothing as far as I know has changed

Also it now no longer generates the service principal linked to the App Registration which it did before without me needing to code it

I have rolled back to 2.27.0 and also to 2.19.0 and still get the same error

Expected behavior

Expected behaviour:

  • Call the AddPassword endpoint and it not to fail and to generate the Client Secret
  • Creates a service principal

How to reproduce

Sets to reproduce are in the decsription

SDK Version

2.29.1

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions