Forum Discussion
mdenning
Jun 29, 2022Copper Contributor
Connecting to defenders account with python
Hello, I am very new to using some of the features that Microsoft Azure and Defender for cloud app has to follow. Currently, I have some credentials which log me into a Microsoft Defender for cloud ...
mdenning
Copper Contributor
Thanks for the response! I have looked into both methods some. The second legacy method seems more appealing to me as the first seems like it wants the user to set a time limit for the credentials, which I don't really want to do (as well as the second method looks simpler). I have generated the static token by following the directions in the link to the documentation, but don't really know what to do next. Do I still need to use the Microsoft authentication library for python to access the data if I use this method? I tried using the token in the requests library to access the data, but I haven't gotten it to work. Thanks for you help so far!
mdenning
Jun 30, 2022Copper Contributor
Neverminded, I think I got it work work. I just needed to make a get request with the request python library to the url I wanted and supply the token in the header as {"Authorization": "Token <token_here>"}. Thanks!