参考:https://blog.csdn.net/vic0228/article/details/80188291
webapp 获取token
https://adfs.demo.local/adfs/oauth2/token?client_id=4d482433-0b9f-4082-9837-b745c8ce9e5d&client_secret=nETud9tWXmAno1q6_UOEKNOuQLwWk1etFJVTK3SW&resource=https://crm.demo.local:5555/api/data/v9.0/&username=&password=&grant_type=password
https://crm.demo.local:5555/api/data/v9.0/WhoAmI
CRMURL
4d482433-0b9f-4082-9837-b745c8ce9e5d
nETud9tWXmAno1q6_UOEKNOuQLwWk1etFJVTK3SW
浏览器获取code然后获取token
https://adfs.demo.local/adfs/oauth2/authorize?response_type=code&resource=https://crm.demo.local:5555/api/data/v9.0/&client_id=4d482433-0b9f-4082-9837-b745c8ce9e5d&redirect_uri=https://localhost
https://localhost/?code=NuQTclVdk0On8Ha_6p2w9w.mfcfppwK1wgBAH7OMx1SOVmToCc.gh6T5tUO5ZEkzE8qe4fvK9R7RSs_LbpObdhAIJGyK_jJ-2lmLuLv-yzpzaFHTMAdjFrs8CpnuTS20CZG_8jgwGNlI58TWEuVgB4-WF-VzItSY5aUbMId6LSOO5wVrN7gYBJ6NXRLa-xTIZ_Z9F7nqeJfwUsyM3UlfyuSXzczNGoyAmo_GRtbj4GdosZ7KMzYvyMqjIpqCnwEpxhj83RJndqaILKEAEsdZg3ulUBXdv_Pb13ikBd9UFePG88Q3HCVqLZnJ8DlHM4LT7zpkinkFeKM_4tfAoddo0RGgtQDGUg7lfKT1Bpfe82Fzk4J0o1zu6m0dljFf6q3KcWM4ZJ3XQ
https://localhost/?code=NuQTclVdk0On8Ha_6p2w9w.m_TQap0K1wgCAKJ18lf6XYR2xJM.Qm6ROMWAnED1QRacMMb3DotfotvHSryDig11dan-GJ-abuN0m8wS6kBvdCvSo7jH_WTfNCF03iErKqNFa7KXwg-w-92npXFTeRerR6h-dbF6omIa8OdHp5Pi7hPJiwdkqYcFTzMzetGEW9AGvvoJ-qf66Zdkd6g8eeuCcJwdmwKuMXWw4lER32x0sf9BS2b66wamHECUbKWAyjb0N6Q38qfl-U_tnPKppxYIGLJkNNYdg9D0czc20VCr81sIX2tHQs5CLhyqYqVTJJyqAqaXPCc-GicZ9DjReS9oU2F6Ae6alG3x7Fa9mQ9jTH-3wgNsT_IIgAy1uW19_uh9xKs5KQ
https://localhost/?code=NuQTclVdk0On8Ha_6p2w9w.XO04rZ0K1wgDAClZ-ObcpPeoo3I.ZLiNpmGZhe_tItpZivvTTQgz610yfuuzC3iS2nX4r6a4nVRV7gW6lWqvq38QblrB65Lg4Rbv2WNGS8e7UuD2lja1dmZ0oNZuD1cI0HSUBRD3T4dEaCeJpTdCkcIYiJKmbM04BwNcwNKuQLYGP0kaOcGqqoH_qTJAQZ0CVIoifY9Jwm1geBzEPsGFRijYIXjQh4Eqqy4-n6Hr09BYgkaHB2A9nIeOco7wmgZfD1mJoox0Tnvrq7Rg963dF5RaHfsYyta8Lv6Zr6swloNZH-mIq6oL3t4BHoRSQRzaXR81PQM_pfd40RszXP1tE9hrPBTsHIw5xJnVttHZy0xgZ53gNQ
如果adfs 和CRM 全部安装在一台服务器上,会有很多问题,最常见的就是端口冲突,所以如果是开发或者学习用的话一定要用下面的文章设置adfs的808端口冲突
https://blog.gagepennisi.com/2016/03/the-authentication-endpoint-username.html