-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating Applications with Federated Credentials results in duplicate App Registrations #741
Comments
Hi @Benmartin92 , Thanks for using the Graph Go SDK, could you attempt to create the application using graph explorer and tell me if you are getting the same issue? |
Yes, same result:
Response:
I also see the two instances created in Azure Portal with the Federated Credential. |
I also opened a support ticket with Azure. They told me using Generally, for unsupported properties, I should get Bad Request, see below:
Now, I am not totally convinced if this is an SDK (for using an undocumented JSON property) or an MS Graph API (for allowing the undocumented JSON property, and producing strange behavior that clearly depends on the property) issue. |
Hi @Benmartin92 , as noted this is a service error and not an SDK error, In order to support the community could you share the link to the issue here, then you can also close this issue |
@rkodev Not really, as I mentioned However, Azure support does not want to resolve the issue on their end, see their reply:
|
Describe the bug
I am trying to create an App Registration via
GraphServiceClient
with a Federated Credential:Executing this code results in an error returned by
graphClient
:Encountered an internal server error
. What is more interesting is that even though the client returned an error, the App Registration is created two times with the same name (the Federated Credential is populated fine in both instances).Simply commenting out the line:
appRequestBody.SetFederatedIdentityCredentials([]graphmodels.FederatedIdentityCredentialable{federatedCredential})
and executing the code again works as expected: a single instance of App Registration (obviously without the Federated Credential) is created and client returns
nil
error.Therefore, I strongly suspect that this issue is related to how Federated Credentials are handled in App Registrations.
Expected behavior
The expected behaviour is that only a single instance is created with the Federated Credentials populated. The
graphClient
should return anil
error, andCreateServicePrincipal()
should return the Application (client) ID.How to reproduce
Just execute the above sample code.
SDK Version
v1.45.0
Latest version known to work for scenario above?
No response
Known Workarounds
I tried to workaround the issue by first creating the application without Federated Credentials and then patching it with Federated Credentials. However, the patching request with Federated Credentials fails with the same error:
Encountered an internal server error
, and the Federated Credential was not added to the App Registration.Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: