如何使用API创建Microsoft应用密码? [英] How to create microsoft app password using API?
问题描述
我可以使用Graph API创建应用程序ID,但不会随之生成应用程序密码.我需要一种使用API生成/设置密码的方法.
I'm able to create app id using Graph API but app secret/password is not generated with it. I need a way to generate/set a password using APIs.
我想念什么吗?
推荐答案
您可以通过Azure AD Graph API创建密码,可以在
You could create the password via Azure AD Graph API, you can test it in the AAD Graph Explorer.
我的测试样本:
请求网址:
PATCH https://graph.windows.net/{tenant id}/applications/{application object id}?api-version=1.6
请求正文:
{
"passwordCredentials": [{
"endDate": "2020-08-12T02:54:44.2530506Z",
"keyId": "77fe4bf5-5d04-4a62-abc2-f064a9213d3f",
"startDate": "2019-08-12T02:54:44.2530506Z",
"customKeyIdentifier": "dGVzdA==",
"value": "XnkNIsT+cScOYeYJayQ4WNmp9tgAqw5z773uI9WQtAw="
}]
}
For more details about the request body, refer to this link - PasswordCredential.
注意:在AAD Graph Explorer中,当您发送请求时,进度条将永远不会结束,但实际上它是可行的,您可以在门户-> Azure Active Directory
之后检查结果一会儿.
Note: In the AAD Graph Explorer, when you send the request, the progress bar will never finish, but actually it works, you could check the result in the portal -> Azure Active Directory
after a while.
此外,Microsoft Graph中还有一个Beta
api-
Besides, there is also a Beta
api in Microsoft Graph - Update application, I have not tested it, so I am not sure if it works. It is a Beta
version, even if it works, I don't recommend you to use it in the production environment.
这篇关于如何使用API创建Microsoft应用密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!