How to replace New-MsolServicePrincipal from the MSOnline module? #2485
VladimirKhvostov
started this conversation in
General
Replies: 2 comments
|
Is it fair to assume that https://provisioningapi.microsoftonline.com/ProvisioningWebService.svc will NOT be deprecated on March 30, 2024? I attached ProvisioningWebServiceClientFactory code if someone is interested. Thanks, |
0 replies
|
Hello, |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
Since MSOnline is planned for deprecation on March 30, 2024, I am trying to migrate out of it.
Here is a code snippet that we use to create a service principal:
The most important piece - we can specify AppPrincipalId.
Here is my C# code (which does not work):
When New-MsolServicePrincipal creates a service principal, I do not see an app in the Azure Portal.
If I try to create an app using ApplicationTemplateId = "8adf8e6e-67b2-4cf2-a259-e3dc5476c621" (non-gallery apps), I getting the following error:
Code: Authorization_RequestDenied
Message: Insufficient privileges to complete the operation.
I can create an app using the same credentials if I comment out ApplicationTemplateId.
Unfortunatelly, I cannot specify AppId. If I try to set AppId, I am getting the following error:
Code: Request_BadRequest
Message: Property 'appId' is read-only and cannot be set.
Inner error:
AdditionalData:
date: 2023-12-09T02:23:38
request-id: 84b404dc-9fdd-4763-a723-9612002c7264
client-request-id: 84b404dc-9fdd-4763-a723-9612002c7264
ClientRequestId: 84b404dc-9fdd-4763-a723-9612002c7264
What can I do to create Application/Service Principal with specific AppId?
Thanks in advance!
--Vladimir
All reactions