问题
As the title, I need to get the client ID of the active azure directory for performing file transfer between linux & onedrive. Is there any API for this.
回答1:
You can't use username & password to create or get the client id.
There is no connection between user credentials and client id.
You should get the client id by creating an Azure AD app. You can see "appId": "631a96bc-a705-4eda-9f99-fdaf9f54f6a2",
in the response. appId
is the client id.
You can also get the client id form an existing Azure AD app by getting application directly.
But I don't think you need to create an Azure AD app or get an Azure AD app in your code and then use the client id. If you want to call Microsoft Graph API, you should create the Azure AD app in Azure portal and get the client id from there and configure it into your project.
来源:https://stackoverflow.com/questions/61937785/how-to-get-clientid-of-azure-active-directory-if-username-password-in-python